[GRASS-SVN] r39502 - in grass/branches/develbranch_6/gui/wxpython:
gui_modules xml
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 13 05:53:24 EDT 2009
Author: martinl
Date: 2009-10-13 05:53:21 -0400 (Tue, 13 Oct 2009)
New Revision: 39502
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py
grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml
Log:
wxGUI: fix GetCmdString() (dictionary instead of tuple)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py 2009-10-13 07:48:07 UTC (rev 39501)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py 2009-10-13 09:53:21 UTC (rev 39502)
@@ -413,16 +413,23 @@
"""
Get GRASS command as string.
- @param cmd GRASS command given as tuple
+ @param cmd GRASS command given as dictionary
@return command string
"""
scmd = ''
if not cmd:
- return ''
+ return scmd
+
scmd = cmd[0]
+
+ if cmd[1].has_key('flags'):
+ for flag in cmd[1]['flags']:
+ scmd += ' -' + flag
for k, v in cmd[1].iteritems():
- scmd += ' %s=%s' % (k, v)
+ if k != 'flags':
+ scmd += ' %s=%s' % (k, v)
+
return scmd
def CmdToTuple(cmd):
Modified: grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml 2009-10-13 07:48:07 UTC (rev 39501)
+++ grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml 2009-10-13 09:53:21 UTC (rev 39502)
@@ -2392,7 +2392,7 @@
<help>Raster map matrix filter.</help>
<keywords>raster,map algebra</keywords>
<handler>self.OnMenuCmd</handler>
- <command>r.mfilter.fp</command>
+ <command>r.mfilter</command>
</menuitem>
</items>
</menu>
More information about the grass-commit
mailing list