Browse Source

wxGUI: add new icon for raster map calculator

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46392 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 năm trước cách đây
mục cha
commit
e8432ebb4e

BIN
gui/icons/grass/calculator.png


+ 1 - 1
gui/wxpython/gui_modules/mcalc_builder.py

@@ -6,7 +6,7 @@
 Classes:
  - MapCalcFrame
 
-(C) 2008, 2010 by the GRASS Development Team
+(C) 2008, 2011 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.

+ 4 - 1
gui/wxpython/gui_modules/toolbars.py

@@ -1638,9 +1638,12 @@ class ToolsToolbar(AbstractToolbar):
         self.modeler = wx.NewId() 
         self.vdigit = wx.NewId()
         self.mapOutput = wx.NewId()
+        self.mapCalc = wx.NewId()
         
         icons = Icons['layerManager']
-        return self._getToolbarData(((self.vdigit, 'vdigit', icons["vdigit"],
+        return self._getToolbarData(((self.mapCalc, 'mapCalc', icons["mapcalc"],
+                                      self.parent.OnMapCalculator),
+                                     (self.vdigit, 'vdigit', icons["vdigit"],
                                       self.parent.OnVDigit),
                                      (self.georect, 'georectify', Icons["georectify"]["georectify"],
                                       self.parent.OnGCPManager),

+ 4 - 2
gui/wxpython/icons/icon.py

@@ -234,8 +234,10 @@ Icons = {
                                 label = _('Graphical Modeler')),
         'layerOptions'  : MetaIcon(img = iconSet.get('options', wx.ART_ERROR),
                                    label = _('Set options')),
-        'mapOutput' : MetaIcon(img = iconSet.get('print-compose', wx.ART_ERROR),
-                               label = _('Hardcopy Map Ouput Utility')),
+        'mapOutput'  : MetaIcon(img = iconSet.get('print-compose', wx.ART_ERROR),
+                                label = _('Hardcopy Map Ouput Utility')),
+        'mapcalc'    : MetaIcon(img = iconSet.get('calculator', wx.ART_ERROR),
+                                label = _('Raster Map Calculator')),
         },
     'vdigit' : {
         'addPoint'        : MetaIcon(img = iconSet.get('point-create', wx.ART_ERROR),

+ 5 - 2
gui/wxpython/wxgui.py

@@ -1039,8 +1039,11 @@ class GMFrame(wx.Frame):
         """!Init map calculator for interactive creation of mapcalc statements
         """
         if event:
-            cmd = self.GetMenuCmd(event)
-
+            try:
+                cmd = self.GetMenuCmd(event)
+            except KeyError:
+                cmd = ['r.mapcalc']
+        
         win = mapcalculator.MapCalcFrame(parent = self,
                                          cmd = cmd[0])
         win.CentreOnScreen()