[GRASS-SVN] r33079 - grass/branches/develbranch_6/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 26 02:43:36 EDT 2008
Author: cmbarton
Date: 2008-08-26 02:43:33 -0400 (Tue, 26 Aug 2008)
New Revision: 33079
Modified:
grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
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.
Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py 2008-08-26 04:57:38 UTC (rev 33078)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py 2008-08-26 06:43:33 UTC (rev 33079)
@@ -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