Kaynağa Gözat

wxGUI: implement SetSelection() from MapsetSelect (backward compatibility)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59222 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 yıl önce
ebeveyn
işleme
e6280a7386

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

@@ -115,7 +115,7 @@ class LocationDialog(SimpleDialog):
                                      setItems = False, skipCurrent = True,
                                      validator = SimpleValidator(callback = self.ValidatorCallback))
         self.element1.SetFocus()
-        self.warning = _("Location or mapset is missing.")
+        self.warning = _("Location or mapset is not defined.")
         self._layout()
         self.SetMinSize(self.GetSize())
 

+ 6 - 0
gui/wxpython/gui_core/gselect.py

@@ -1176,6 +1176,12 @@ class MapsetSelect(wx.combo.ComboCtrl):
         wx.ComboBox to wx.combo.ComboCtrl"""
         return self.SetValue(text)
 
+    def SetSelection(self, sel=0):
+        """!For backward compatibility. MapsetSelect changed to allow
+        multiple selection, this required to change super-class from
+        wx.ComboBox to wx.combo.ComboCtrl"""
+        self.SetValue('') # TODO: implement SetSelection()
+
     def SetItems(self, items):
         """!For backward compatibility. MapsetSelect changed to allow
         multiple selection, this required to change super-class from