[GRASS-SVN] r42285 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 18 06:43:09 EDT 2010


Author: martinl
Date: 2010-05-18 06:43:07 -0400 (Tue, 18 May 2010)
New Revision: 42285

Modified:
   grass/trunk/gui/wxpython/gui_modules/gmodeler.py
   grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/modeler: trac --overwrite flag


Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-05-18 09:46:48 UTC (rev 42284)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-05-18 10:43:07 UTC (rev 42285)
@@ -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/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2010-05-18 09:46:48 UTC (rev 42284)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2010-05-18 10:43:07 UTC (rev 42285)
@@ -1072,8 +1072,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,
@@ -1102,7 +1101,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