[GRASS-SVN] r35534 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 21 12:57:15 EST 2009
Author: martinl
Date: 2009-01-21 12:57:15 -0500 (Wed, 21 Jan 2009)
New Revision: 35534
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: fix layer > 1
(merge from trunk, r35533)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2009-01-21 17:54:08 UTC (rev 35533)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2009-01-21 17:57:15 UTC (rev 35534)
@@ -1327,8 +1327,7 @@
# set widget relations for OnUpdateSelection
#
pMap = None
- pLayer = None
- pLayerList = []
+ pLayer = []
pDriver = None
pDatabase = None
pTable = None
@@ -1344,11 +1343,9 @@
if name in ('map', 'input'):
pMap = p
elif prompt == 'layer':
- pLayerList.append(p['wxId'])
- if not pLayer: # TODO: check all 'layer' options
- pLayer = p
+ pLayer.append(p)
elif prompt == 'dbcolumn':
- pColumn.append(p['wxId'])
+ pColumn.append(p)
elif prompt == 'dbdriver':
pDriver = p
elif prompt == 'dbname':
@@ -1356,13 +1353,20 @@
elif prompt == 'dbtable':
pTable = p
+ pColumnIds = []
+ for p in pColumn:
+ pColumnIds.append(p['wxId'])
+ pLayerIds = []
+ for p in pLayer:
+ pLayerIds.append(p['wxId'])
+
if pMap:
- pMap['wxId-bind'] = copy.copy(pColumn)
+ pMap['wxId-bind'] = copy.copy(pColumnIds)
if pLayer:
- pMap['wxId-bind'] += pLayerList
+ pMap['wxId-bind'] += pLayerIds
- if pLayer:
- p['wxId-bind'] = pColumn
+ for p in pLayer:
+ p['wxId-bind'] = copy.copy(pColumnIds)
if pDriver and pTable:
pDriver['wxId-bind'] = [pTable['wxId'], ]
@@ -1537,6 +1541,7 @@
id = event.GetId()
p = self.task.get_param(id, element='wxId', raiseError=False)
+
if not p or \
not p.has_key('wxId-bind'):
return
More information about the grass-commit
mailing list