[GRASS-SVN] r72313 - grass/trunk/gui/wxpython/gmodeler

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 2 14:45:34 PST 2018


Author: martinl
Date: 2018-03-02 14:45:33 -0800 (Fri, 02 Mar 2018)
New Revision: 72313

Modified:
   grass/trunk/gui/wxpython/gmodeler/model.py
Log:
wxGUI/gmodeler: store display tag in model file

Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py	2018-03-02 22:42:15 UTC (rev 72312)
+++ grass/trunk/gui/wxpython/gmodeler/model.py	2018-03-02 22:45:33 UTC (rev 72313)
@@ -354,6 +354,7 @@
                                  prompt=data['prompt'],
                                  value=data['value'])
             dataItem.SetIntermediate(data['intermediate'])
+            dataItem.SetHasDisplay(data['display'])
 
             for rel in data['rels']:
                 actionItem = self.FindAction(rel['id'])
@@ -2041,11 +2042,10 @@
                 prompt = param.get('prompt', None)
                 value = self._filterValue(self._getNodeText(param, 'value'))
 
-            if data.find('intermediate') is None:
-                intermediate = False
-            else:
-                intermediate = True
+            intermediate = False if data.find('intermediate') is None else True
 
+            display = False if data.find('display') is None else True
+            
             rels = list()
             for rel in data.findall('relation'):
                 defrel = {'id': int(rel.get('id', -1)),
@@ -2064,6 +2064,7 @@
                               'prompt': prompt,
                               'value': value,
                               'intermediate': intermediate,
+                              'display': display,
                               'rels': rels})
 
     def _processTask(self, node):
@@ -2404,6 +2405,8 @@
 
             if data.IsIntermediate():
                 self.fd.write('%s<intermediate />\n' % (' ' * self.indent))
+            if data.HasDisplay():
+                self.fd.write('%s<display />\n' % (' ' * self.indent))
 
             # relations
             for ft in ('from', 'to'):



More information about the grass-commit mailing list