[GRASS-SVN] r64635 - grass/trunk/gui/wxpython/dbmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 14 14:44:42 PST 2015


Author: wenzeslaus
Date: 2015-02-14 14:44:42 -0800 (Sat, 14 Feb 2015)
New Revision: 64635

Modified:
   grass/trunk/gui/wxpython/dbmgr/base.py
Log:
wxGUI: use FitInside instead of deprecated SetVirtualSizeHints

 * fixes #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


Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py	2015-02-14 22:34:17 UTC (rev 64634)
+++ grass/trunk/gui/wxpython/dbmgr/base.py	2015-02-14 22:44:42 UTC (rev 64635)
@@ -2891,8 +2891,12 @@
                       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)



More information about the grass-commit mailing list