[GRASS-SVN] r68928 - grass/trunk/gui/wxpython/core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jul 9 17:26:18 PDT 2016
Author: annakrat
Date: 2016-07-09 17:26:18 -0700 (Sat, 09 Jul 2016)
New Revision: 68928
Modified:
grass/trunk/gui/wxpython/core/workspace.py
Log:
wxGUI: fix saving overlays in workspace file after recent changes
Modified: grass/trunk/gui/wxpython/core/workspace.py
===================================================================
--- grass/trunk/gui/wxpython/core/workspace.py 2016-07-10 00:16:06 UTC (rev 68927)
+++ grass/trunk/gui/wxpython/core/workspace.py 2016-07-10 00:26:18 UTC (rev 68928)
@@ -1517,22 +1517,9 @@
"""Function for writing map elements (barscale, northarrow etc.)
"""
disp_size = mapdisp.GetMapWindow().GetClientSize()
+ for overlay in mapdisp.decorations.values():
+ self.__writeOverlayParams(disp_size, overlay.cmd, overlay.coords)
- if mapdisp.arrow.IsShown():
- cmd = mapdisp.arrow.cmd
- coord_px = mapdisp.arrow.coords
- self.__writeOverlayParams(disp_size, cmd, coord_px)
-
- if (mapdisp.legend) and mapdisp.legend.IsShown():
- cmd = mapdisp.legend.cmd
- coord_px = mapdisp.legend.coords
- self.__writeOverlayParams(disp_size, cmd, coord_px)
-
- if mapdisp.barscale and mapdisp.barscale.IsShown():
- cmd = mapdisp.barscale.cmd
- coord_px = mapdisp.barscale.coords
- self.__writeOverlayParams(disp_size, cmd, coord_px)
-
def __writeOverlayParams(self, disp_size, cmd, coord_px):
"""
:param mapdisp: mapdisplay
More information about the grass-commit
mailing list