Explorar el Código

wxGUI/gmodeler: fix parametrized dialog on more items with the same label

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67761 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa hace 9 años
padre
commit
f449b536f4
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      gui/wxpython/gmodeler/model.py

+ 4 - 1
gui/wxpython/gmodeler/model.py

@@ -813,9 +813,11 @@ class Model(object):
                 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 @@ class Model(object):
             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