[GRASS-SVN] r61810 - grass/branches/releasebranch_7_0/gui/wxpython/lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 5 17:27:12 PDT 2014
Author: annakrat
Date: 2014-09-05 17:27:12 -0700 (Fri, 05 Sep 2014)
New Revision: 61810
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: fix a few minor issues with loading and checking layers when 3d view is set (merge from trunk, r61573)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py 2014-09-06 00:11:28 UTC (rev 61809)
+++ grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py 2014-09-06 00:27:12 UTC (rev 61810)
@@ -1321,6 +1321,8 @@
self.GetPyData(item) is not None:
# nviz - load/unload data layer
mapLayer = self.GetLayerInfo(item, key = 'maplayer')
+ if mapLayer is None:
+ return
self.mapdisplay.SetStatusText(_("Please wait, updating data..."), 0)
@@ -1396,6 +1398,11 @@
event.GetItem() is a valid layer;
self.layer_selected is a valid layer
"""
+ # when no layer selected, nothing to do here
+ if self.layer_selected is None:
+ event.Skip()
+ return
+
layer = event.GetItem()
digitToolbar = self.mapdisplay.GetToolbar('vdigit')
if digitToolbar:
@@ -1625,8 +1632,8 @@
# set region if auto-zooming is enabled or layer tree contains
# only one map layer
if dcmd:
- if self.first or \
- UserSettings.Get(group = 'display', key = 'autoZooming', subkey = 'enabled'):
+ if not self.mapdisplay.IsPaneShown('3d') and (self.first or
+ UserSettings.Get(group = 'display', key = 'autoZooming', subkey = 'enabled')):
mapLayer = self.GetLayerInfo(layer, key = 'maplayer')
if mapLayer.GetType() in ('raster', 'vector'):
self.mapdisplay.MapWindow.ZoomToMap(layers = [mapLayer,],
More information about the grass-commit
mailing list