[GRASS-SVN] r35535 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 21 13:04:45 EST 2009


Author: martinl
Date: 2009-01-21 13:04:45 -0500 (Wed, 21 Jan 2009)
New Revision: 35535

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: fix layer > 1
      (merge from trunk, r35533)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py	2009-01-21 17:57:15 UTC (rev 35534)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py	2009-01-21 18:04:45 UTC (rev 35535)
@@ -1326,8 +1326,7 @@
         # set widget relations for OnUpdateSelection
         #
         pMap = None
-        pLayer = None
-        pLayerList = []
+        pLayer = []
         pDriver = None
         pDatabase = None
         pTable = None
@@ -1343,11 +1342,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':
@@ -1355,13 +1352,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'], ]
@@ -1534,6 +1538,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