Просмотр исходного кода

synchronize vector map select, layer select and column select

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55891 15284696-431f-4ddb-bdfa-cd5b030d7da7
Štěpán Turek 12 лет назад
Родитель
Сommit
de5c3caf88
2 измененных файлов с 10 добавлено и 2 удалено
  1. 2 1
      gui/wxpython/gui_core/forms.py
  2. 8 1
      gui/wxpython/gui_core/gselect.py

+ 2 - 1
gui/wxpython/gui_core/forms.py

@@ -1624,9 +1624,10 @@ class CmdPanel(wx.Panel):
         
         # set wxId-bindings
         if pMap:
-            pMap['wxId-bind'] = copy.copy(pColumnIds)
+            pMap['wxId-bind'] = []
             if pLayer:
                 pMap['wxId-bind'] +=  pLayerIds
+            pMap['wxId-bind'] += copy.copy(pColumnIds)
         if pLayer:
             for p in pLayer:
                 p['wxId-bind'] = copy.copy(pColumnIds)

+ 8 - 1
gui/wxpython/gui_core/gselect.py

@@ -851,7 +851,14 @@ class LayerSelect(wx.ComboBox):
 
         if len(layers) > 0:
             self.SetItems(layers)
-        
+            self.SetValue(layers[0])
+        else:
+            self.Clear()
+            self.SetValue("")
+
+        if self.default:
+            self.SetValue(self.default)
+
 class DriverSelect(wx.ComboBox):
     """!Creates combo box for selecting database driver.
     """