Quellcode durchsuchen

wxGUI: fix another bug related with change to accept multiple values
in MapsetSelect


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58674 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa vor 11 Jahren
Ursprung
Commit
235fe0c212
1 geänderte Dateien mit 14 neuen und 2 gelöschten Zeilen
  1. 14 2
      gui/wxpython/gui_core/gselect.py

+ 14 - 2
gui/wxpython/gui_core/gselect.py

@@ -1122,9 +1122,9 @@ class MapsetSelect(wx.combo.ComboCtrl):
             self.gisdbase = dbase
         self.location = location
         if location:
-            self.SetItems(self._getMapsets())
+            self.tcp.SetItems(self._getMapsets())
         else:
-            self.SetItems([])
+            self.tcp.SetItems([])
      
     def _getMapsets(self):
         if self.searchPath:
@@ -1144,11 +1144,23 @@ class MapsetSelect(wx.combo.ComboCtrl):
         return mlist
 
     def GetStringSelection(self):
+        """!For backward compatibility. MapsetSelect changed to allow
+        multiple selection, this required to change super-class from
+        wx.ComboBox to wx.combo.ComboCtrl"""
         return self.GetValue()
 
     def SetStringSelection(self, text):
+        """!For backward compatibility. MapsetSelect changed to allow
+        multiple selection, this required to change super-class from
+        wx.ComboBox to wx.combo.ComboCtrl"""
         return self.SetValue(text)
 
+    def SetItems(self, items):
+        """!For backward compatibility. MapsetSelect changed to allow
+        multiple selection, this required to change super-class from
+        wx.ComboBox to wx.combo.ComboCtrl"""
+        self.tcp.SetItems(items)
+
 class SubGroupSelect(wx.ComboBox):
     """!Widget for selecting subgroups"""
     def __init__(self, parent, id = wx.ID_ANY, size = globalvar.DIALOG_GSELECT_SIZE,