[GRASS-SVN] r73323 - in grass/trunk/gui/wxpython: mapwin nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 13 13:26:24 PDT 2018


Author: annakrat
Date: 2018-09-13 13:26:24 -0700 (Thu, 13 Sep 2018)
New Revision: 73323

Modified:
   grass/trunk/gui/wxpython/mapwin/buffered.py
   grass/trunk/gui/wxpython/mapwin/decorations.py
   grass/trunk/gui/wxpython/nviz/animation.py
Log:
wxGUI: GetClientSizeTuple is not anymore in wx4

Modified: grass/trunk/gui/wxpython/mapwin/buffered.py
===================================================================
--- grass/trunk/gui/wxpython/mapwin/buffered.py	2018-09-13 16:12:54 UTC (rev 73322)
+++ grass/trunk/gui/wxpython/mapwin/buffered.py	2018-09-13 20:26:24 UTC (rev 73323)
@@ -725,7 +725,7 @@
         self.Draw(self.pdc, img, drawid=99)
 
         # compute size ratio to move overlay accordingly
-        cSize = self.GetClientSizeTuple()
+        cSize = self.GetClientSize()
         ratio = float(
             self.Map.width) / cSize[0], float(self.Map.height) / cSize[1]
 

Modified: grass/trunk/gui/wxpython/mapwin/decorations.py
===================================================================
--- grass/trunk/gui/wxpython/mapwin/decorations.py	2018-09-13 16:12:54 UTC (rev 73322)
+++ grass/trunk/gui/wxpython/mapwin/decorations.py	2018-09-13 20:26:24 UTC (rev 73323)
@@ -334,7 +334,7 @@
     def _finishResizing(self):
         window = self._giface.GetMapWindow()
         window.mouseLeftUp.disconnect(self._finishResizing)
-        screenSize = window.GetClientSizeTuple()
+        screenSize = window.GetClientSize()
         self.ResizeLegend(
             window.mouse["begin"],
             window.mouse["end"],

Modified: grass/trunk/gui/wxpython/nviz/animation.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/animation.py	2018-09-13 16:12:54 UTC (rev 73322)
+++ grass/trunk/gui/wxpython/nviz/animation.py	2018-09-13 20:26:24 UTC (rev 73323)
@@ -180,7 +180,7 @@
         :param prefix: file prefix
         :param format: index of image file format
         """
-        w, h = self.mapWindow.GetClientSizeTuple()
+        size = self.mapWindow.GetClientSize()
         toolWin = self.mapWindow.GetToolWin()
 
         formatter = ':04.0f'
@@ -208,8 +208,8 @@
                 self.mapWindow.SaveToFile(
                     FileName=filepath,
                     FileType=self.formats[format],
-                    width=w,
-                    height=h)
+                    width=size[0],
+                    height=size[1])
                 self.currentFrame += 1
 
                 wx.Yield()



More information about the grass-commit mailing list