[GRASS-SVN] r64766 - in grass/trunk/gui/wxpython: core lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 27 11:48:08 PST 2015


Author: martinl
Date: 2015-02-27 11:48:07 -0800 (Fri, 27 Feb 2015)
New Revision: 64766

Modified:
   grass/trunk/gui/wxpython/core/workspace.py
   grass/trunk/gui/wxpython/lmgr/frame.py
Log:
wxGUI: hack writing workspace for wxPython (incorrect height) (TODO: find out why this bug appears with wxPython)

Modified: grass/trunk/gui/wxpython/core/workspace.py
===================================================================
--- grass/trunk/gui/wxpython/core/workspace.py	2015-02-27 11:04:43 UTC (rev 64765)
+++ grass/trunk/gui/wxpython/core/workspace.py	2015-02-27 19:48:07 UTC (rev 64766)
@@ -20,6 +20,7 @@
 
 import wx
 
+from core.globalvar import wxPython3
 from core.utils     import normalize_whitespace, _
 from core.settings  import UserSettings
 from core.gcmd      import EncodeString, GetDefaultEncoding
@@ -739,6 +740,8 @@
             
             displayPos = mapdisp.GetPosition()
             displaySize = mapdisp.GetSize()
+            if wxPython3:
+                displaySize[1] -= 32 # see related hack on line lmgr.frame.LoadWorkspaceFile()
             if mapdisp.toolbars['map'].combo.GetSelection() == 1:
                 viewmode = '3d'
             else:

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2015-02-27 11:04:43 UTC (rev 64765)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2015-02-27 19:48:07 UTC (rev 64766)
@@ -1282,8 +1282,9 @@
                     mapdisp.SetPosition(display['pos'])
                 if display['size']:
                     if globalvar.wxPython3:
-                        # incorrect height
-                        # TODO: fix it in better way (...)
+                        # Incorrect height
+                        # TODO: fix it in better way !!!
+                        # Then also remove hack in core.workspace.WriteWorkspaceFile() ...
                         display['size'] = (display['size'][0], display['size'][1] + 32)
                     mapdisp.SetSize(display['size'])
             



More information about the grass-commit mailing list