[GRASS-SVN] r57588 - grass/trunk/gui/wxpython/lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 3 03:09:40 PDT 2013
Author: martinl
Date: 2013-09-03 03:09:40 -0700 (Tue, 03 Sep 2013)
New Revision: 57588
Modified:
grass/trunk/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: set region if auto-zooming is enabled or layer tree contains
only one map layer
Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py 2013-09-02 16:24:10 UTC (rev 57587)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py 2013-09-03 10:09:40 UTC (rev 57588)
@@ -1478,8 +1478,10 @@
# change parameters for item in layers list in render.Map
self.ChangeLayer(layer)
- # set region if auto-zooming is enabled
- if dcmd and UserSettings.Get(group = 'display', key = 'autoZooming', subkey = 'enabled'):
+ # set region if auto-zooming is enabled or layer tree contains
+ # only one map layer
+ if dcmd and (len(self.GetVisibleLayers()) < 2 or \
+ UserSettings.Get(group = 'display', key = 'autoZooming', subkey = 'enabled')):
mapLayer = self.GetLayerInfo(layer, key = 'maplayer')
if mapLayer.GetType() in ('raster', 'vector'):
render = UserSettings.Get(group = 'display', key = 'autoRendering', subkey = 'enabled')
More information about the grass-commit
mailing list