[GRASS-SVN] r49006 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 30 13:28:31 EDT 2011


Author: martinl
Date: 2011-10-30 10:28:31 -0700 (Sun, 30 Oct 2011)
New Revision: 49006

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI: fix indeces of dialog pages


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2011-10-30 12:25:56 UTC (rev 49005)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2011-10-30 17:28:31 UTC (rev 49006)
@@ -440,7 +440,7 @@
         for p in item.GetParams()['params']:
             if p.get('element', '') == 'file' and \
                     p.get('prompt', '') == 'input' and \
-                    p.get('age', '') == 'old':
+                    p.get('age', '') == 'old_file':
                 filename = p.get('value', p.get('default', ''))
                 if filename and \
                         mimetypes.guess_type(filename)[0] == 'text/plain':
@@ -685,7 +685,7 @@
             params = list()
             result["variables"] = { 'flags'  : list(),
                                     'params' : params,
-                                    'idx' : idx }
+                                    'idx'    : idx }
             for name, values in self.variables.iteritems():
                 gtype = values.get('type', 'string')
                 if gtype in ('raster', 'vector', 'mapset', 'file'):
@@ -741,7 +741,8 @@
                                          'params': list(),
                                          'idx'   : idx }
                     result[name]['params'].append(p)
-            idx += 1
+            if name in result:
+                idx += 1
         
         self.variablesParams = result # record parameters
         
@@ -3891,7 +3892,7 @@
         """!Create for each parameterized module its own page"""
         nameOrdered = [''] * len(self.params.keys())
         for name, params in self.params.iteritems():
-            nameOrdered[params['idx']] =  name
+            nameOrdered[params['idx']] = name
         for name in nameOrdered:
             params = self.params[name]
             panel = self._createPage(name, params)



More information about the grass-commit mailing list