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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jul 10 04:42:21 EDT 2009


Author: martinl
Date: 2009-07-10 04:42:20 -0400 (Fri, 10 Jul 2009)
New Revision: 38340

Modified:
   grass/trunk/gui/wxpython/gui_modules/menuform.py
   grass/trunk/gui/wxpython/gui_modules/utils.py
Log:
wxGUI: fix G_OPT_V_FIELD opts (multi)


Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2009-07-10 08:22:50 UTC (rev 38339)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2009-07-10 08:42:20 UTC (rev 38340)
@@ -214,8 +214,12 @@
             name = win.GetName()
             
             if name == 'LayerSelect':
-                self.data[win.InsertLayers] = { 'vector' : map }
-                
+                if not map and p.get('element', '') == 'vector':
+                    # standard way failed, try to track wxIds manually
+                    map = p.get('value', '')
+                if map:
+                    self.data[win.InsertLayers] = { 'vector' : map }
+            
             elif name == 'TableSelect':
                 pDriver = self.task.get_param('dbdriver', element='prompt', raiseError=False)
                 driver = db = None

Modified: grass/trunk/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/utils.py	2009-07-10 08:22:50 UTC (rev 38339)
+++ grass/trunk/gui/wxpython/gui_modules/utils.py	2009-07-10 08:42:20 UTC (rev 38340)
@@ -240,17 +240,13 @@
 
 def GetVectorNumberOfLayers(vector):
     """!Get list of vector layers"""
-    cmdlist = ['v.category',
-               'input=%s' % vector,
-               'option=report']
+    layers = list()
     
-    layers = []
-    
     ret = gcmd.RunCommand('v.category',
                           read = True,
                           input = vector,
                           option = 'report')
-
+    
     if not ret:
         return layers
     



More information about the grass-commit mailing list