[GRASS-SVN] r65254 - grass/trunk/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 16 07:49:39 PDT 2015


Author: martinl
Date: 2015-05-16 07:49:39 -0700 (Sat, 16 May 2015)
New Revision: 65254

Modified:
   grass/trunk/gui/wxpython/core/render.py
Log:
wxGUI/render: layer.Render() env optional (attempt to fix mapswipe)

Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py	2015-05-15 21:56:58 UTC (rev 65253)
+++ grass/trunk/gui/wxpython/core/render.py	2015-05-16 14:49:39 UTC (rev 65254)
@@ -122,7 +122,7 @@
     def __repr__(self):
         return self.__str__()
     
-    def Render(self, env):
+    def Render(self, env=None):
         """Render layer to image
 
         :return: rendered image filename
@@ -144,9 +144,13 @@
         if self.type not in layertypes:
             raise GException(_("<%(name)s>: layer type <%(type)s> is not supported") % \
                                  {'type' : self.type, 'name' : self.name})
-
+        
+        if env:
+            env.update(self.render_env)
+        else:
+            env = self.render_env.copy()
+        
         # render layers
-        env.update(self.render_env)
         try:
             if self.type == 'command':
                 first = True



More information about the grass-commit mailing list