[GRASS-SVN] r70545 - in grass/trunk/gui/wxpython: core lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 12 13:21:50 PST 2017
Author: annakrat
Date: 2017-02-12 13:21:50 -0800 (Sun, 12 Feb 2017)
New Revision: 70545
Modified:
grass/trunk/gui/wxpython/core/workspace.py
grass/trunk/gui/wxpython/lmgr/frame.py
Log:
wxGUI: save showing/hiding toolbar or statusbar of map displays in workspace
Modified: grass/trunk/gui/wxpython/core/workspace.py
===================================================================
--- grass/trunk/gui/wxpython/core/workspace.py 2017-02-12 20:26:42 UTC (rev 70544)
+++ grass/trunk/gui/wxpython/core/workspace.py 2017-02-12 21:21:50 UTC (rev 70545)
@@ -160,6 +160,8 @@
"render": bool(int(display.get('render', "0"))),
"mode": int(display.get('mode', 0)),
"showCompExtent": bool(int(display.get('showCompExtent', "0"))),
+ "showStatusbar": bool(int(display.get('showStatusbar', "0"))),
+ "showToolbars": bool(int(display.get('showToolbars', "0"))),
"pos": pos,
"size": size,
"extent": extent,
@@ -848,6 +850,8 @@
'mode="%d" showCompExtent="%d" '
'alignExtent="%d" '
'constrainRes="%d" '
+ 'showStatusbar="%d" '
+ 'showToolbars="%d" '
'dim="%d,%d,%d,%d" '
'extent="%f,%f,%f,%f,%f,%f" '
'tbres="%f" ' # needed only for animation tool
@@ -858,6 +862,8 @@
int(mapdisp.mapWindowProperties.showRegion),
int(mapdisp.mapWindowProperties.alignExtent),
int(mapdisp.mapWindowProperties.resolution),
+ int(mapdisp.statusbarManager.IsShown()),
+ int(mapdisp.GetMapToolbar().IsShown()),
displayPos[0],
displayPos[1],
displaySize[0],
Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py 2017-02-12 20:26:42 UTC (rev 70544)
+++ grass/trunk/gui/wxpython/lmgr/frame.py 2017-02-12 21:21:50 UTC (rev 70545)
@@ -1454,6 +1454,11 @@
region['s'],
region['e'],
region['w'])
+ if 'showStatusbar' in display and not display['showStatusbar']:
+ mapdisp.statusbarManager.Show(False)
+ if 'showToolbars' in display and not display['showToolbars']:
+ for toolbar in mapdisp.GetToolbarNames():
+ mapdisp.RemoveToolbar(toolbar)
displayId += 1
mapdisp.Show() # show mapdisplay
More information about the grass-commit
mailing list