[GRASS-SVN] r45099 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 20 08:42:08 EST 2011


Author: martinl
Date: 2011-01-20 05:42:07 -0800 (Thu, 20 Jan 2011)
New Revision: 45099

Modified:
   grass/trunk/gui/wxpython/gui_modules/render.py
Log:
wxGUI/render: comment-out problematic code (crashes wxGUI)


Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py	2011-01-20 13:17:22 UTC (rev 45098)
+++ grass/trunk/gui/wxpython/gui_modules/render.py	2011-01-20 13:42:07 UTC (rev 45099)
@@ -121,9 +121,7 @@
         Debug.msg (3, "Layer.Render(): type=%s, name=%s" % \
                        (self.type, self.name))
         
-        #
         # prepare command for each layer
-        #
         layertypes = ('raster', 'rgb', 'his', 'shaded', 'rastarrow', 'rastnum',
                       'vector','thememap','themechart',
                       'grid', 'geodesic', 'rhumb', 'labels',
@@ -134,15 +132,11 @@
             raise gcmd.GException(_("<%(name)s>: layer type <%(type)s> is not supported") % \
                                       {'type' : self.type, 'name' : self.name})
         
-        #
         # start monitor
-        #
 	if self.mapfile:
 	    os.environ["GRASS_PNGFILE"] = self.mapfile
                 
-        #
         # execute command
-        #
         try:
             if self.type == 'command':
                 read = False
@@ -162,10 +156,10 @@
                                            getErrorMsg = True,
                                            quiet = True,
                                            **self.cmd[1])
-            if len(msg):
-                sys.stderr.write(_("Running") + " '" + utils.GetCmdString(self.cmd) + "'")
-                sys.stderr.write(msg)
-            
+            # if len(msg):
+            # sys.stderr.write(_("Running") + " '" + utils.GetCmdString(self.cmd) + "'")
+            # sys.stderr.write(msg)
+                
             if ret != 0:
                 # clean up after problem
                 try:
@@ -178,7 +172,7 @@
                 self.maskfile = None
         
         except gcmd.GException, e:
-            print >> sys.stderr, e
+            sys.stderr.write(e)
             # clean up after problems
             try:
                 os.remove(self.mapfile)
@@ -189,9 +183,7 @@
             self.mapfile = None
             self.maskfile = None
         
-        #
         # stop monitor
-        #
         if os.environ.has_key("GRASS_PNGFILE"):
             del os.environ["GRASS_PNGFILE"]
         
@@ -865,7 +857,7 @@
         os.environ["GRASS_PNG_READ"] = "FALSE"
         
         self._renderLayers(force, mapWindow, maps, masks, opacities)
-            
+        
         # ugly hack for MSYS
         if not subprocess.mswindows:
             mapstr = ",".join(maps)



More information about the grass-commit mailing list