[GRASS-SVN] r61573 - grass/trunk/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 8 19:21:08 PDT 2014


Author: annakrat
Date: 2014-08-08 19:21:08 -0700 (Fri, 08 Aug 2014)
New Revision: 61573

Modified:
   grass/trunk/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: fix a few minor issues with loading and checking layers when 3d view is set

Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py	2014-08-09 02:15:21 UTC (rev 61572)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py	2014-08-09 02:21:08 UTC (rev 61573)
@@ -1326,6 +1326,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)
 
@@ -1401,6 +1403,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:
@@ -1630,8 +1637,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