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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jun 11 09:44:02 PDT 2016


Author: annakrat
Date: 2016-06-11 09:44:01 -0700 (Sat, 11 Jun 2016)
New Revision: 68668

Modified:
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: save changes to workspace notification fixed, author Adam Laza, see #2369

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2016-06-11 10:51:47 UTC (rev 68667)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2016-06-11 16:44:01 UTC (rev 68668)
@@ -650,8 +650,9 @@
         """Page of notebook closed
         Also close associated map display
         """
+
         if UserSettings.Get(group='manager', key='askOnQuit',
-                            subkey='enabled'):
+                            subkey='enabled') and self.workspaceChanged:
             maptree = self.GetLayerTree()
 
             if self.workspaceFile:

Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py	2016-06-11 10:51:47 UTC (rev 68667)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py	2016-06-11 16:44:01 UTC (rev 68668)
@@ -1598,7 +1598,6 @@
 
     def OnLayerChecked(self, event):
         """Enable/disable data layer"""
-        self.lmgr.WorkspaceChanged()
 
         item = event.GetItem()
         checked = item.IsChecked()
@@ -1618,6 +1617,7 @@
                             mapLayer):
                         # ignore when map layer is edited
                         self.Map.ChangeLayerActive(mapLayer, checked)
+                        self.lmgr.WorkspaceChanged()
                     child = self.GetNextSibling(child)
             else:
                 mapLayer = self.GetLayerInfo(item, key='maplayer')
@@ -1625,6 +1625,7 @@
                         digitToolbar and digitToolbar.GetLayer() != mapLayer)):
                     # ignore when map layer is edited
                     self.Map.ChangeLayerActive(mapLayer, checked)
+                    self.lmgr.WorkspaceChanged()
 
         # nviz
         if self.mapdisplay.IsPaneShown('3d') and \
@@ -1636,6 +1637,7 @@
 
             self.mapdisplay.SetStatusText(
                 _("Please wait, updating data..."), 0)
+            self.lmgr.WorkspaceChanged()
 
             if checked:  # enable
                 if mapLayer.type == 'raster':



More information about the grass-commit mailing list