Explorar o código

wxGUI: quick fix for import dialog for wxPython 2.9.4

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55679 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=12) %!d(string=hai) anos
pai
achega
44f11acb46
Modificáronse 1 ficheiros con 6 adicións e 3 borrados
  1. 6 3
      gui/wxpython/gui_core/gselect.py

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

@@ -1540,14 +1540,17 @@ class GdalSelect(wx.Panel):
 
 
     def OnSetType(self, event, sel = None):
-        """!Datasource type changed"""
+        """!Datasource type changed.
+
+        @todo improve showing/hiding widgets        
+        """
         if event:
             sel = event.GetSelection()
         else:
             self.source.SetSelection(sel)
         win = self.input[self.dsnType][1]
         if win:
-            self.dsnSizer.Remove(win)
+            self.dsnSizer.Detach(win)
             win.Hide()
         
         if sel == self.sourceMap['file']:   # file
@@ -1764,7 +1767,7 @@ class GdalSelect(wx.Panel):
             return
         
         win = self.input[self.dsnType][1]
-        self.dsnSizer.Remove(win)
+        self.dsnSizer.Detach(win)
         
         if self.dsnType == 'file':
             win.Destroy()