[GRASS-SVN] r65569 - in grass/trunk/gui/wxpython: core mapwin
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 10 14:43:06 PDT 2015
Author: martinl
Date: 2015-07-10 14:43:06 -0700 (Fri, 10 Jul 2015)
New Revision: 65569
Modified:
grass/trunk/gui/wxpython/core/render.py
grass/trunk/gui/wxpython/mapwin/decorations.py
Log:
wxGUI: fix rendering overlays (render by default)
Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py 2015-07-10 21:08:08 UTC (rev 65568)
+++ grass/trunk/gui/wxpython/core/render.py 2015-07-10 21:43:06 UTC (rev 65569)
@@ -372,9 +372,7 @@
cmd_render = copy.deepcopy(cmd)
cmd_render[1]['quiet'] = True # be quiet
- # for k, v in env_cmd.iteritems():
- # if 'GRASS_' in k:
- # print 'export %s=%s' % (k, v)
+
self._startTime = time.time()
self.thread.Run(callable=self._render, cmd=cmd_render, env=env_cmd,
ondone=self.OnRenderDone)
@@ -1360,19 +1358,20 @@
:return: new layer on success
:return: None on failure
"""
- Debug.msg (1, "Map.AddOverlay(): cmd={}".format(command))
overlay = Overlay(id = id, name = ltype, cmd = command, Map = self,
active = active, hidden = hidden, opacity = opacity)
- self._addLayer(overlay, render)
-
+ self._addLayer(overlay)
+
renderMgr = overlay.GetRenderMgr()
+ Debug.msg (1, "Map.AddOverlay(): cmd={}".format(overlay.GetCmd(string=True)))
if renderMgr:
renderMgr.updateProgress.connect(self.renderMgr.ReportProgress)
+ overlay.forceRender = render
return overlay
- def ChangeOverlay(self, id, render = False, **kargs):
+ def ChangeOverlay(self, id, **kargs):
"""Change overlay properities
Add new overlay if overlay with 'id' doesn't exist.
@@ -1405,8 +1404,9 @@
if 'opacity' in kargs:
overlay.SetOpacity(kargs['opacity'])
- overlay.forceRender = render
-
+ if 'render' in kargs:
+ overlay.forceRender = kargs['render']
+
return overlay
def GetOverlay(self, id, list=False):
Modified: grass/trunk/gui/wxpython/mapwin/decorations.py
===================================================================
--- grass/trunk/gui/wxpython/mapwin/decorations.py 2015-07-10 21:08:08 UTC (rev 65568)
+++ grass/trunk/gui/wxpython/mapwin/decorations.py 2015-07-10 21:43:06 UTC (rev 65569)
@@ -161,13 +161,12 @@
def _add(self):
self._overlay = self._renderer.AddOverlay(id=self._id, ltype=self._name,
command=self.cmd, active=False,
- render=False, hidden=True)
+ render=True, hidden=True)
# check if successful
def _update(self):
- self._renderer.ChangeOverlay(id=self._id, command=self._cmd,
- render=False)
-
+ self._renderer.ChangeOverlay(id=self._id, command=self._cmd)
+
def CmdIsValid(self):
"""If command is valid"""
return True
More information about the grass-commit
mailing list