[GRASS-SVN] r44269 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 8 18:23:00 EST 2010
Author: martinl
Date: 2010-11-08 15:23:00 -0800 (Mon, 08 Nov 2010)
New Revision: 44269
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/menuform: simplify OnSetValue
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2010-11-08 23:02:27 UTC (rev 44268)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2010-11-08 23:23:00 UTC (rev 44269)
@@ -1690,7 +1690,7 @@
pLocation['wxId-bind'] = pMapset['wxId']
if pLocation and pMapset and pMap:
- pLocation['wxId-bind'] = pMap['wxId']
+ pLocation['wxId-bind'] += pMap['wxId']
pMapset['wxId-bind'] = pMap['wxId']
#
@@ -1848,29 +1848,30 @@
for selectors.
"""
myId = event.GetId()
- me = wx.FindWindowById( myId )
+ me = wx.FindWindowById(myId)
name = me.GetName()
-
+
+ found = False
for porf in self.task.params + self.task.flags:
if not porf.has_key('wxId'):
continue
- found = False
- for id in porf['wxId']:
- if id == myId:
- found = True
- break
-
- if found:
- if name in ('LayerSelect', 'DriverSelect', 'TableSelect',
- 'LocationSelect', 'MapsetSelect'):
- porf['value'] = me.GetStringSelection()
- elif name == 'GdalSelect':
- porf['value'] = event.dsn
- elif name == 'ModelParam':
- porf['parameterized'] = me.IsChecked()
- else:
- porf['value'] = me.GetValue()
+ if myId in porf['wxId']:
+ found = True
+ break
+ if not found:
+ return
+
+ if name in ('LayerSelect', 'DriverSelect', 'TableSelect',
+ 'LocationSelect', 'MapsetSelect', 'ProjSelect'):
+ porf['value'] = me.GetStringSelection()
+ elif name == 'GdalSelect':
+ porf['value'] = event.dsn
+ elif name == 'ModelParam':
+ porf['parameterized'] = me.IsChecked()
+ else:
+ porf['value'] = me.GetValue()
+
self.OnUpdateValues(event)
event.Skip()
More information about the grass-commit
mailing list