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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 24 05:46:46 EDT 2012


Author: martinl
Date: 2012-05-24 02:46:44 -0700 (Thu, 24 May 2012)
New Revision: 51694

Modified:
   grass/trunk/gui/wxpython/core/render.py
Log:
wxGUI: fix rendering - skip map layers which haven't been rendered successfully


Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py	2012-05-24 09:46:11 UTC (rev 51693)
+++ grass/trunk/gui/wxpython/core/render.py	2012-05-24 09:46:44 UTC (rev 51694)
@@ -9,7 +9,7 @@
  - render::Overlay
  - render::Map
 
-(C) 2006-2011 by the GRASS Development Team
+(C) 2006-2012 by the GRASS Development Team
 
 This program is free software under the GNU General Public License
 (>=v2). Read the file COPYING that comes with GRASS for details.
@@ -861,6 +861,14 @@
         return selected
 
     def _renderLayers(self, force = False, mapWindow = None, overlaysOnly = False):
+        """!Render all map layers into files
+
+        @param force True to force rendering
+        @param mapWindow GUI window or None (statusbar/progress bar)
+        @param overlaysOnly True to render only overlays
+
+        @return list of maps, masks and opacities
+        """
         maps = list()
         masks = list()
         opacities = list()
@@ -887,6 +895,10 @@
                 event = wxUpdateProgressBar(value = ilayer)
                 wx.PostEvent(mapWindow, event)
             
+            # skip map layers when rendering fails
+            if not os.path.exists(layer.mapfile):
+                continue
+            
             # add image to compositing list
             if layer.type != "overlay":
                 maps.append(layer.mapfile)



More information about the grass-commit mailing list