فهرست منبع

wxGUI: GetClientSizeTuple is not anymore in wx4

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73323 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 6 سال پیش
والد
کامیت
5ca78adb2c
3فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 1 1
      gui/wxpython/mapwin/buffered.py
  2. 1 1
      gui/wxpython/mapwin/decorations.py
  3. 3 3
      gui/wxpython/nviz/animation.py

+ 1 - 1
gui/wxpython/mapwin/buffered.py

@@ -725,7 +725,7 @@ class BufferedMapWindow(MapWindowBase, Window):
         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]
 

+ 1 - 1
gui/wxpython/mapwin/decorations.py

@@ -334,7 +334,7 @@ class LegendController(OverlayController):
     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"],

+ 3 - 3
gui/wxpython/nviz/animation.py

@@ -180,7 +180,7 @@ class Animation:
         :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 @@ class Animation:
                 self.mapWindow.SaveToFile(
                     FileName=filepath,
                     FileType=self.formats[format],
-                    width=w,
-                    height=h)
+                    width=size[0],
+                    height=size[1])
                 self.currentFrame += 1
 
                 wx.Yield()