[GRASS-SVN] r57243 - in grass/trunk/gui/wxpython: lmgr mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 21 23:48:58 PDT 2013
Author: wenzeslaus
Date: 2013-07-21 23:48:57 -0700 (Sun, 21 Jul 2013)
New Revision: 57243
Modified:
grass/trunk/gui/wxpython/lmgr/layertree.py
grass/trunk/gui/wxpython/mapdisp/mapwindow.py
Log:
wxGUI/mapwindow: removing lmgr layertree specific code from mapwindow (now rerender request handled fully in layertree)
Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py 2013-07-21 21:25:18 UTC (rev 57242)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py 2013-07-22 06:48:57 UTC (rev 57243)
@@ -131,8 +131,9 @@
self.saveitem = {} # dictionary to preserve layer attributes for drag and drop
self.first = True # indicates if a layer is just added or not
self.flag = '' # flag for drag and drop hittest
- self.rerender = False # layer change requires a rerendering if auto render
- self.reorder = False # layer change requires a reordering
+ # layer change requires a rerendering
+ # (used to request rendering only when layer changes are finished)
+ self.rerender = False
self.hitCheckbox = False # if cursor points at layer checkbox (to cancel selection changes)
self.forceCheck = False # force check layer if CheckItem is called
@@ -162,7 +163,7 @@
id = wx.ID_ANY, pos = pos,
size = globalvar.MAP_WINDOW_SIZE,
style = wx.DEFAULT_FRAME_STYLE,
- tree = self, notebook = self.notebook,
+ notebook = self.notebook,
lmgr = self.lmgr, page = self.treepg,
Map = self.Map)
@@ -362,15 +363,12 @@
"""!Only re-order and re-render a composite map image from GRASS during
idle time instead of multiple times during layer changing.
"""
+ # no need to check for digitizer since it is handled internaly
+ # no need to distinguish 2D and 3D since the interface is the same
+ # remove this comment when it is onl enough
if self.rerender:
- if self.mapdisplay.GetToolbar('vdigit'):
- vector = True
- else:
- vector = False
if self.mapdisplay.IsAutoRendered():
- self.mapdisplay.MapWindow2D.UpdateMap(render = True, renderVector = vector)
- if self.lmgr.IsPaneShown('toolbarNviz'): # nviz
- self.mapdisplay.MapWindow3D.UpdateMap(render = True)
+ self.mapdisplay.GetMapWindow().UpdateMap(render=True)
self.rerender = False
event.Skip()
Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2013-07-21 21:25:18 UTC (rev 57242)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2013-07-22 06:48:57 UTC (rev 57243)
@@ -629,10 +629,11 @@
# render background image if needed
#
- # reset flag for auto-rendering
- if self.tree:
- self.tree.rerender = False
-
+ # here was the change of the layertree rerender variable
+ # but it is fully the problem of layertree
+ # and so it is handled there
+ # remove this comment when it is old enough
+
try:
if render:
# update display size
More information about the grass-commit
mailing list