[GRASS-SVN] r48773 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 13 07:44:37 EDT 2011
Author: martinl
Date: 2011-10-13 04:44:36 -0700 (Thu, 13 Oct 2011)
New Revision: 48773
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: check action when loading model file
(merge r48772 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py 2011-10-13 11:38:59 UTC (rev 48772)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py 2011-10-13 11:44:36 UTC (rev 48773)
@@ -1473,6 +1473,19 @@
self.itemPanel.Update()
self.SetStatusText('', 0)
+ # final updates
+ for action in self.model.GetItems(objType = ModelAction):
+ valid = True
+ params = action.GetParams()
+ for p in params['params']:
+ if p.get('required', False) and \
+ p.get('value', '') == '' and \
+ p.get('default', '') == '':
+ valid = False
+ break
+ action.SetValid(valid)
+ action.Update()
+
self.canvas.Refresh(True)
def WriteModelFile(self, filename):
More information about the grass-commit
mailing list