[GRASS-SVN] r49020 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 31 09:02:22 EDT 2011


Author: martinl
Date: 2011-10-31 06:02:22 -0700 (Mon, 31 Oct 2011)
New Revision: 49020

Modified:
   grass/trunk/gui/wxpython/gui_modules/layertree.py
Log:
wxGUI/layertree: unselect when changing visibility of map layer
		 (merge r49018 from devbr6)


Modified: grass/trunk/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/layertree.py	2011-10-31 13:01:15 UTC (rev 49019)
+++ grass/trunk/gui/wxpython/gui_modules/layertree.py	2011-10-31 13:02:22 UTC (rev 49020)
@@ -1114,9 +1114,9 @@
         
         item    = event.GetItem()
         checked = item.IsChecked()
-
+        
         digitToolbar = self.mapdisplay.GetToolbar('vdigit')
-        if self.first == False:
+        if not self.first:
             # change active parameter for item in layers list in render.Map
             if self.GetPyData(item)[0]['type'] == 'group':
                 child, cookie = self.GetFirstChild(item)
@@ -1134,15 +1134,13 @@
                        (digitToolbar and digitToolbar.GetLayer() != mapLayer):
                     # ignore when map layer is edited
                     self.Map.ChangeLayerActive(mapLayer, checked)
-
-        #
+        
+        self.Unselect()
+        
         # update progress bar range (mapwindow statusbar)
-        #
         self.mapdisplay.GetProgressBar().SetRange(len(self.Map.GetListOfLayers(l_active = True)))
-
-        #
+        
         # nviz
-        #
         if self.lmgr.IsPaneShown('toolbarNviz') and \
                 self.GetPyData(item) is not None:
             # nviz - load/unload data layer
@@ -1171,7 +1169,7 @@
                     self.mapdisplay.MapWindow.UnloadVector(item)
             
             self.mapdisplay.SetStatusText("", 0)
-
+        
         # redraw map if auto-rendering is enabled
         self.rerender = True
         self.reorder = True



More information about the grass-commit mailing list