[GRASS-SVN] r49898 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 24 18:55:18 EST 2011
Author: martinl
Date: 2011-12-24 15:55:18 -0800 (Sat, 24 Dec 2011)
New Revision: 49898
Modified:
grass/trunk/gui/wxpython/gui_core/goutput.py
Log:
wxGUI: fix launching command without any paramaters
Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py 2011-12-24 23:22:26 UTC (rev 49897)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py 2011-12-24 23:55:18 UTC (rev 49898)
@@ -535,18 +535,13 @@
else:
# other GRASS commands (r|v|g|...)
- if len(command) == 1 and command[0] != 'v.krige':
- # no arguments given
- try:
- GUI(parent = self).ParseCommand(command)
- except GException, e:
- print >> sys.stderr, e
- return 0
-
task = GUI(show = None).ParseCommand(command)
+ hasParams = False
if task:
+ options = task.get_options()
+ hasParams = options['params'] and options['flags']
# check for <input>=-
- for p in task.get_options()['params']:
+ for p in options['params']:
if p.get('prompt', '') == 'input' and \
p.get('element', '') == 'file' and \
p.get('age', 'new') == 'old' and \
@@ -558,6 +553,15 @@
'opt': p.get('name', '') })
return 1
+ if len(command) == 1 and hasParams and \
+ command[0] != 'v.krige':
+ # no arguments given
+ try:
+ GUI(parent = self).ParseCommand(command)
+ except GException, e:
+ print >> sys.stderr, e
+ return 0
+
# switch to 'Command output' if required
if switchPage:
self._notebook.SetSelectionByName('output')
More information about the grass-commit
mailing list