[GRASS-SVN] r63439 - in grass/trunk/gui/wxpython: gui_core mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 8 04:42:55 PST 2014


Author: martinl
Date: 2014-12-08 04:42:55 -0800 (Mon, 08 Dec 2014)
New Revision: 63439

Modified:
   grass/trunk/gui/wxpython/gui_core/mapdisp.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI: resize MapFrame - fix 'd.mon wx0 w= h='

Modified: grass/trunk/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapdisp.py	2014-12-08 12:28:54 UTC (rev 63438)
+++ grass/trunk/gui/wxpython/gui_core/mapdisp.py	2014-12-08 12:42:55 UTC (rev 63439)
@@ -119,6 +119,14 @@
         Map.region = Map.GetRegion() # g.region -upgc
         # 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):
         self.GetWindow().UnregisterAllHandlers()
 

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2014-12-08 12:28:54 UTC (rev 63438)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2014-12-08 12:42:55 UTC (rev 63439)
@@ -232,6 +232,8 @@
 
         self.measureController = None
 
+        self._resize()
+     
     def GetMapWindow(self):
         return self.MapWindow
 



More information about the grass-commit mailing list