Explorar el Código

wxGUI: use FitInside instead of deprecated SetVirtualSizeHints

 * fixes https://trac.osgeo.org/grass/ticket/2028 (SetVirtualSizeHints is deprecated in wxWidgets 2.9)
 * using code from gui_core/goutput.py
 * should be replaced by simple FitInside call in the future


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64635 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras hace 10 años
padre
commit
843472cd71
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      gui/wxpython/dbmgr/base.py

+ 6 - 2
gui/wxpython/dbmgr/base.py

@@ -2891,8 +2891,12 @@ class LayerBook(wx.Notebook):
                       proportion = 2,
                       flag = wx.TOP | wx.BOTTOM | wx.RIGHT | wx.EXPAND,
                       border = 3)
-        
-        layerSizer.SetVirtualSizeHints(self.addPanel)
+
+        # SetVirtualSizeHints is deprecated and is
+        # exactly the same as FitInside() in wxWidgets 2.9 and later
+        getattr(layerSizer, 'FitInside',
+                layerSizer.SetVirtualSizeHints)(self.addPanel)
+
         self.addPanel.SetAutoLayout(True)
         self.addPanel.SetSizer(pageSizer)
         pageSizer.Fit(self.addPanel)