Ver código fonte

wxGUI/dbmgr: fix querying for areas (v.what returns no Id)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52834 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 anos atrás
pai
commit
3fe1ef0c24
2 arquivos alterados com 3 adições e 1 exclusões
  1. 1 1
      gui/wxpython/dbmgr/dialogs.py
  2. 2 0
      gui/wxpython/dbmgr/vinfo.py

+ 1 - 1
gui/wxpython/dbmgr/dialogs.py

@@ -400,7 +400,7 @@ class DisplayAttributesDialog(wx.Dialog):
                 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

+ 2 - 0
gui/wxpython/dbmgr/vinfo.py

@@ -124,6 +124,8 @@ class VectorDBInfo(VectorDBInfoBase):
                     continue
                 if key in ret:
                     ret[key].append(value)
+                else:
+                    ret[key].append(None)
         return ret
     
     def SelectFromTable(self, layer, cols = '*', where = None):