[GRASS-SVN] r48874 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 19 21:49:37 EDT 2011
Author: martinl
Date: 2011-10-19 18:49:37 -0700 (Wed, 19 Oct 2011)
New Revision: 48874
Modified:
grass/trunk/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI: fix parameter substitution (reset values)
Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2011-10-20 01:25:59 UTC (rev 48873)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2011-10-20 01:49:37 UTC (rev 48874)
@@ -497,8 +497,9 @@
# get variable values
varValue = dict()
- for var in params['variables']['params']:
- varValue[var['name']] = var['value']
+ if 'variables' in params:
+ for var in params['variables']['params']:
+ varValue[var['name']] = var['value']
log.cmdThread.SetId(-1)
for item in self.GetItems():
@@ -558,8 +559,9 @@
# discard values
if params:
- for var in params['variables']['params']:
- var['value'] = ''
+ for item in params.itervalues():
+ for p in item['params']:
+ p['value'] = ''
if params:
dlg.Destroy()
@@ -3176,7 +3178,7 @@
(' ' * self.indent, f.get('name', '')))
else: # parameter
for p in val:
- if not p.get('value', ''):
+ if not p.get('value', '') and not p.get('parameterized', False):
continue
self.fd.write('%s<parameter name="%s">\n' %
(' ' * self.indent, p.get('name', '')))
More information about the grass-commit
mailing list