瀏覽代碼

wxGUI: add r3.mapcalc to the menu

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42187 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 年之前
父節點
當前提交
24809c3555
共有 2 個文件被更改,包括 22 次插入12 次删除
  1. 5 7
      gui/wxpython/wxgui.py
  2. 17 5
      gui/wxpython/xml/menudata.xml

+ 5 - 7
gui/wxpython/wxgui.py

@@ -959,17 +959,15 @@ class GMFrame(wx.Frame):
     def OnMapCalculator(self, event):
         """!Init map calculator for interactive creation of mapcalc statements
         """
-        win = mapcalculator.MapCalcFrame(parent = self, title = _('2D raster calculator'))
+        win = mapcalculator.MapCalcFrame(parent = self, title = _('GRASS GIS Map Calculator'))
         win.CentreOnScreen()
         win.Show()
         
-    def Disp3DMapCalculator(self, event):
-        """
-        Init map calculator for interactive creation of mapcalc statements
+    def OnMapCalculator3D(self, event):
+        """!Init map calculator for interactive creation of mapcalc statements
         """
-        
-        mapcalculator.MapCalcFrame(parent = self, title = _('3D raster calculator'),
-                                   rast3d = True)
+        win = mapcalculator.MapCalcFrame(parent = self, title = _('GRASS GIS Map Calculator (3D raster)'),
+                                         rast3d = True)
         win.CentreOnScreen()
         win.Show()
         

+ 17 - 5
gui/wxpython/xml/menudata.xml

@@ -2791,11 +2791,23 @@
 	  <handler>OnMenuCmd</handler>
 	  <command>r3.mask</command>
 	</menuitem>
-	<menuitem>
-	  <label>3D raster map calculator</label>
-	  <help>Map calculator for volumetric map algebra</help>
-	  <handler>Disp3DMapCalculator</handler>
-	</menuitem>
+	<menu>
+	  <label>Map algebra</label>
+	  <items>
+	    <menuitem>
+	      <label>Interactive map calculator</label>
+	      <help>Map calculator for raster map algebra.</help>
+	      <handler>OnMapCalculator3D</handler>
+	    </menuitem>
+	    <menuitem>
+	      <label>Map calculator</label>
+	      <help>Raster map calculator.</help>
+	      <keywords>raster,algebra</keywords>
+	      <handler>OnMenuCmd</handler>
+	      <command>r3.mapcalc</command>
+	    </menuitem>
+	  </items>
+	</menu>
 	<menuitem>
 	  <label>Cross section</label>
 	  <help>Creates cross section 2D raster map from 3d raster map based on 2D elevation map</help>