Parcourir la source

attempt to fix https://trac.osgeo.org/grass/ticket/1362

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46273 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz il y a 14 ans
Parent
commit
8d248c2e12
2 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 1 1
      gui/wxpython/gui_modules/gselect.py
  2. 2 1
      gui/wxpython/gui_modules/utils.py

+ 1 - 1
gui/wxpython/gui_modules/gselect.py

@@ -656,7 +656,7 @@ class LayerSelect(wx.Choice):
         
     def InsertLayers(self, vector):
         """!Insert layers for a vector into the layer combobox"""
-        layerchoices = utils.GetVectorNumberOfLayers(vector)
+        layerchoices = utils.GetVectorNumberOfLayers(self, vector)
         
         if self.all:
             layerchoices.insert(0, '-1')

+ 2 - 1
gui/wxpython/gui_modules/utils.py

@@ -274,7 +274,7 @@ def ListSortLower(list):
     """!Sort list items (not case-sensitive)"""
     list.sort(cmp=lambda x, y: cmp(x.lower(), y.lower()))
 
-def GetVectorNumberOfLayers(vector):
+def GetVectorNumberOfLayers(parent, vector):
     """!Get list of vector layers"""
     layers = list()
     if not vector:
@@ -286,6 +286,7 @@ def GetVectorNumberOfLayers(vector):
         return layers
     
     ret = gcmd.RunCommand('v.db.connect',
+                          parent = parent,
                           flags = 'g',
                           read = True,
                           map = fullname,