[GRASS-SVN] r45100 - grass/branches/develbranch_6/gui/wxpython/gui_modules

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


Author: martinl
Date: 2011-01-20 05:44:05 -0800 (Thu, 20 Jan 2011)
New Revision: 45100

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


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2011-01-20 13:42:07 UTC (rev 45099)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2011-01-20 13:44:05 UTC (rev 45100)
@@ -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,9 +132,7 @@
             raise gcmd.GException(_("<%(name)s>: layer type <%(type)s> is not supported") % \
                                       {'type' : self.type, 'name' : self.name})
         
-        #
         # start monitor
-        #
         if UserSettings.Get(group='display', key='driver', subkey='type') == 'cairo':
 #            os.environ["GRASS_CAIROFILE"] = self.mapfile
 #            if 'cairo' not in gcmd.RunCommand('d.mon',
@@ -166,9 +162,7 @@
             if self.mapfile:
                 os.environ["GRASS_PNGFILE"] = self.mapfile
         
-        #
         # execute command
-        #
         try:
             if self.type == 'command':
                 read = False
@@ -188,11 +182,11 @@
                                            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:
@@ -205,7 +199,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)
@@ -216,9 +210,7 @@
             self.mapfile = None
             self.maskfile = None
         
-        #
         # stop monitor
-        #
         if UserSettings.Get(group='display', key='driver', subkey='type') == 'cairo':
 #            gcmd.RunCommand('d.mon',
 #                            stop = 'cairo')
@@ -895,7 +887,7 @@
             os.environ["GRASS_RENDER_IMMEDIATE"] = "TRUE"
         
         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