[GRASS-SVN] r49018 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 31 09:00:52 EDT 2011


Author: martinl
Date: 2011-10-31 06:00:52 -0700 (Mon, 31 Oct 2011)
New Revision: 49018

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
Log:
wxGUI/layertree: unselect when changing visibility of map layer


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2011-10-31 12:54:38 UTC (rev 49017)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2011-10-31 13:00:52 UTC (rev 49018)
@@ -1041,9 +1041,9 @@
         
         item    = event.GetItem()
         checked = item.IsChecked()
-
+        
         digitToolbar = self.mapdisplay.toolbars['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)
@@ -1061,15 +1061,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.statusbarWin['progress'].SetRange(len(self.Map.GetListOfLayers(l_active = True)))
-
-        #
+        
         # nviz
-        #
         if self.mapdisplay.toolbars['nviz'] and \
                 self.GetPyData(item) is not None:
             # nviz - load/unload data layer
@@ -1098,7 +1096,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