Selaa lähdekoodia

fix rulescmd (menu tree item)
(merge https://trac.osgeo.org/grass/changeset/39413 from devbr6)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39415 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 15 vuotta sitten
vanhempi
commit
7511f7df74
2 muutettua tiedostoa jossa 8 lisäystä ja 7 poistoa
  1. 7 6
      gui/wxpython/wxgui.py
  2. 1 1
      gui/wxpython/xml/menudata.xml

+ 7 - 6
gui/wxpython/wxgui.py

@@ -993,18 +993,19 @@ class GMFrame(wx.Frame):
         self.curr_page = None
         
 
-    def RulesCmd(self, event):
+    def RulesCmd(self, event, cmd = ''):
         """
         Launches dialog for commands that need rules
         input and processes rules
         """
-        command = self.GetMenuCmd(event)
+        if event:
+            cmd = self.GetMenuCmd(event)
                 
-        if command[0] == 'r.colors' or command[0] == 'vcolors':
-            ctable = colorrules.ColorTable(self, cmd=command[0])
+        if cmd[0] == 'r.colors' or cmd[0] == 'vcolors':
+            ctable = colorrules.ColorTable(self, cmd=cmd[0])
             ctable.Show()
         else:
-            dlg = rules.RulesText(self, cmd=command)
+            dlg = rules.RulesText(self, cmd=cmd)
             dlg.CenterOnScreen()
             if dlg.ShowModal() == wx.ID_OK:
                 gtemp = utils.GetTempfile()
@@ -1014,7 +1015,7 @@ class GMFrame(wx.Frame):
                 finally:
                     output.close()
     
-                cmdlist = [command[0],
+                cmdlist = [cmd[0],
                            'input=%s' % dlg.inmap,
                            'output=%s' % dlg.outmap,
                            'rules=%s' % gtemp]

+ 1 - 1
gui/wxpython/xml/menudata.xml

@@ -1383,7 +1383,7 @@
 	    <menuitem>
 	      <label>Reclassify interactively</label>
 	      <help>Creates a new map layer whose category values are based upon a reclassification of the categories in an existing raster map layer.</help>
-	      <keywords>raster</keywords>
+	      <keywords>raster,statistics,aggregation</keywords>
               <handler>self.RulesCmd</handler>
 	      <command>r.reclass</command>
 	    </menuitem>