Pārlūkot izejas kodu

wxGUI: resize MapFrame - fix 'd.mon wx0 w= h='

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63439 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 gadi atpakaļ
vecāks
revīzija
a68fe933ef
2 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 8 0
      gui/wxpython/gui_core/mapdisp.py
  2. 2 0
      gui/wxpython/mapdisp/frame.py

+ 8 - 0
gui/wxpython/gui_core/mapdisp.py

@@ -119,6 +119,14 @@ class MapFrameBase(wx.Frame):
         Map.region = Map.GetRegion() # g.region -upgc
         Map.region = Map.GetRegion() # g.region -upgc
         # self.Map.SetRegion() # adjust region to match display window
         # self.Map.SetRegion() # adjust region to match display window
 
 
+    def _resize(self):
+        Debug.msg(1, "MapFrame._resize():")
+        wm, hw = self.MapWindow.GetClientSize()
+        wf, hf = self.GetSize()
+        dw = wf - wm
+        dh = hf - hw
+        self.SetSize((wf + dw, hf + dh))
+
     def _onToggleTool(self):
     def _onToggleTool(self):
         self.GetWindow().UnregisterAllHandlers()
         self.GetWindow().UnregisterAllHandlers()
 
 

+ 2 - 0
gui/wxpython/mapdisp/frame.py

@@ -232,6 +232,8 @@ class MapFrame(SingleMapFrame):
 
 
         self.measureController = None
         self.measureController = None
 
 
+        self._resize()
+     
     def GetMapWindow(self):
     def GetMapWindow(self):
         return self.MapWindow
         return self.MapWindow