[GRASS-SVN] r33082 - grass/trunk/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 26 04:17:19 EDT 2008
Author: martinl
Date: 2008-08-26 04:17:18 -0400 (Tue, 26 Aug 2008)
New Revision: 33082
Modified:
grass/trunk/gui/wxpython/wxgui.py
Log:
cmbarton: Another fix to allow a 'dummy command' to be run from the menu in order to launch a module not associated with a GRASS bin or script file.
(merge from devbr6, r33079)
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2008-08-26 08:15:43 UTC (rev 33081)
+++ grass/trunk/gui/wxpython/wxgui.py 2008-08-26 08:17:18 UTC (rev 33082)
@@ -424,11 +424,19 @@
"""Get GRASS command from menu item
Return command as a list"""
+ layer = None
+
cmd = self.menucmd[event.GetId()]
+
try:
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']:
+ return cmdlist
try:
layer = self.curr_page.maptree.layer_selected
@@ -877,7 +885,7 @@
input and processes rules
"""
command = self.GetMenuCmd(event)
-
+
if command[0] == 'r.colors' or command[0] == 'vcolors':
ctable = colorrules.ColorTable(self, cmd=command[0])
ctable.Show()
More information about the grass-commit
mailing list