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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 7 11:53:04 PST 2016


Author: martinl
Date: 2016-02-07 11:53:04 -0800 (Sun, 07 Feb 2016)
New Revision: 67761

Modified:
   grass/trunk/gui/wxpython/gmodeler/model.py
Log:
wxGUI/gmodeler: fix parametrized dialog on more items with the same label

Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py	2016-02-07 19:52:25 UTC (rev 67760)
+++ grass/trunk/gui/wxpython/gmodeler/model.py	2016-02-07 19:53:04 UTC (rev 67761)
@@ -813,9 +813,11 @@
                 continue
             name   = action.GetLabel()
             params = action.GetParams()
+            increment = False
             for f in params['flags']:
                 if f.get('parameterized', False):
                     if name not in result:
+                        increment = True
                         result[name] = { 'flags' : list(),
                                          'params': list(),
                                          'idx'   : idx }
@@ -823,11 +825,12 @@
             for p in params['params']:
                 if p.get('parameterized', False):
                     if name not in result:
+                        increment = True
                         result[name] = { 'flags' : list(),
                                          'params': list(),
                                          'idx'   : idx }
                     result[name]['params'].append(p)
-            if name in result:
+            if increment:
                 idx += 1
         
         self.variablesParams = result # record parameters



More information about the grass-commit mailing list