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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 18 06:47:21 EDT 2010


Author: martinl
Date: 2010-05-18 06:47:21 -0400 (Tue, 18 May 2010)
New Revision: 42287

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/modeler: track --overwrite flag
(merge r42285 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2010-05-18 10:46:53 UTC (rev 42286)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2010-05-18 10:47:21 UTC (rev 42287)
@@ -1514,7 +1514,6 @@
         """!Show properties dialog"""
         self.frame.ModelChanged()
         shape = self.GetShape()
-        # win = shape.GetPropDialog()
         if isinstance(shape, ModelAction):
             module = menuform.GUI().ParseCommand(shape.GetLog(string = False),
                                                  completed = (self.frame.GetOptData, shape, shape.GetParams()),
@@ -1869,7 +1868,7 @@
                 parametrized.append(('param', name))
             cmd.append('%s=%s' % (name,
                                   self._filterValue(self._getNodeText(p, 'value'))))
-            
+        
         task = menuform.GUI().ParseCommand(cmd = cmd,
                                            show = None)
         

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-05-18 10:46:53 UTC (rev 42286)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-05-18 10:47:21 UTC (rev 42287)
@@ -1033,8 +1033,7 @@
             self.label_id.append(chk.GetId())
             if tooltip:
                 chk.SetToolTipString(tooltip)
-            if 'value' in f:
-                chk.SetValue( f['value'] )
+            chk.SetValue(f.get('value', False))
             title_sizer.Add(item=chk, proportion=1,
                             flag=wx.EXPAND)
             title_sizer.Add(item=rtitle_txt, proportion=0,
@@ -1063,7 +1062,7 @@
                 if f['name'] == vq:
                     chk.SetValue(True)
                     f['value'] = True
-            elif f['name'] == 'overwrite':
+            elif f['name'] == 'overwrite' and not f.has_key('value'):
                 chk.SetValue(UserSettings.Get(group='cmd', key='overwrite', subkey='enabled'))
                 f['value'] = UserSettings.Get(group='cmd', key='overwrite', subkey='enabled')
                 



More information about the grass-commit mailing list