[GRASS-SVN] r48772 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 13 07:38:59 EDT 2011
Author: martinl
Date: 2011-10-13 04:38:59 -0700 (Thu, 13 Oct 2011)
New Revision: 48772
Modified:
grass/trunk/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: check action when loading model file
Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2011-10-13 11:05:21 UTC (rev 48771)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2011-10-13 11:38:59 UTC (rev 48772)
@@ -1467,6 +1467,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