[GRASS-SVN] r52834 - grass/trunk/gui/wxpython/dbmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 22 07:07:17 PDT 2012


Author: annakrat
Date: 2012-08-22 07:07:17 -0700 (Wed, 22 Aug 2012)
New Revision: 52834

Modified:
   grass/trunk/gui/wxpython/dbmgr/dialogs.py
   grass/trunk/gui/wxpython/dbmgr/vinfo.py
Log:
wxGUI/dbmgr: fix querying for areas (v.what returns no Id)

Modified: grass/trunk/gui/wxpython/dbmgr/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/dialogs.py	2012-08-22 13:47:57 UTC (rev 52833)
+++ grass/trunk/gui/wxpython/dbmgr/dialogs.py	2012-08-22 14:07:17 UTC (rev 52834)
@@ -400,7 +400,7 @@
                 idx = 0
                 for layer in data['Layer']:
                     layer = int(layer)
-                    if 'Id' in data:
+                    if data['Id'][idx] is not None:
                         tfid = int(data['Id'][idx])
                     else:
                         tfid = 0 # Area / Volume

Modified: grass/trunk/gui/wxpython/dbmgr/vinfo.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/vinfo.py	2012-08-22 13:47:57 UTC (rev 52833)
+++ grass/trunk/gui/wxpython/dbmgr/vinfo.py	2012-08-22 14:07:17 UTC (rev 52834)
@@ -124,6 +124,8 @@
                     continue
                 if key in ret:
                     ret[key].append(value)
+                else:
+                    ret[key].append(None)
         return ret
     
     def SelectFromTable(self, layer, cols = '*', where = None):



More information about the grass-commit mailing list