[GRASS-SVN] r42638 - in grass/trunk/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 22 19:15:56 EDT 2010


Author: martinl
Date: 2010-06-22 23:15:56 +0000 (Tue, 22 Jun 2010)
New Revision: 42638

Modified:
   grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py
   grass/trunk/gui/wxpython/wxgui.py
Log:
fix #1097
(merge r42637 from devbr6)


Modified: grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py	2010-06-22 23:12:51 UTC (rev 42637)
+++ grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py	2010-06-22 23:15:56 UTC (rev 42638)
@@ -38,7 +38,7 @@
     """!Mapcalc Frame class. Calculator-style window to create and run
     r(3).mapcalc statements
     """
-    def __init__(self, parent, cmd, id = wx.ID_ANY, title = _('Map calculator'), 
+    def __init__(self, parent, cmd, id = wx.ID_ANY,
                  style = wx.DEFAULT_FRAME_STYLE | wx.RESIZE_BORDER, **kwargs):
         self.parent = parent
         if self.parent:
@@ -51,9 +51,11 @@
 
         if self.cmd == 'r.mapcalc':
             self.rast3d = False
+            title = _('GRASS GIS Raster Calculator')
         if self.cmd == 'r3.mapcalc':
             self.rast3d = True
-
+            title = _('GRASS GIS 3D Raster Calculator')
+            
         wx.Frame.__init__(self, parent, id = id, title = title, **kwargs)
         self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2010-06-22 23:12:51 UTC (rev 42637)
+++ grass/trunk/gui/wxpython/wxgui.py	2010-06-22 23:15:56 UTC (rev 42638)
@@ -400,10 +400,10 @@
             cmdlist = cmd.split(' ')
         except: # already list?
             cmdlist = cmd
-            
+        
         # check list of dummy commands for GUI modules that do not have GRASS
         # bin modules or scripts. 
-        if cmd in ['vcolors']:
+        if cmd in ['vcolors', 'r.mapcalc', 'r3.mapcalc']:
             return cmdlist
 
         try:
@@ -412,13 +412,14 @@
             type = self.curr_page.maptree.GetPyData(layer)[0]['type']
         except:
             layer = None
+
         if layer and len(cmdlist) == 1: # only if no paramaters given
             if (type == 'raster' and cmdlist[0][0] == 'r' and cmdlist[0][1] != '3') or \
                     (type == 'vector' and cmdlist[0][0] == 'v'):
                 input = menuform.GUI().GetCommandInputMapParamKey(cmdlist[0])
                 if input:
                     cmdlist.append("%s=%s" % (input, name))
-
+        
         return cmdlist
 
     def RunMenuCmd(self, event, cmd = ''):
@@ -963,22 +964,11 @@
         if event:
             cmd = self.GetMenuCmd(event)
 
-        win = mapcalculator.MapCalcFrame(parent = self, title = _('GRASS GIS Map Calculator'),
+        win = mapcalculator.MapCalcFrame(parent = self,
                                          cmd=cmd[0])
         win.CentreOnScreen()
         win.Show()
-        
-    def OnMapCalculator3D(self, event, cmd =''):
-        """!Init map calculator for interactive creation of mapcalc statements
-        """
-        if event:
-            cmd = self.GetMenuCmd(event)
-
-        win = mapcalculator.MapCalcFrame(parent = self, title = _('GRASS GIS Map Calculator (3D raster)'),
-                                         cmd=cmd[0])
-        win.CentreOnScreen()
-        win.Show()
-
+    
     def OnVectorCleaning(self, event, cmd = ''):
         """!Init interactive vector cleaning
         """



More information about the grass-commit mailing list