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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 7 15:23:16 PST 2014


Author: martinl
Date: 2014-02-07 15:23:15 -0800 (Fri, 07 Feb 2014)
New Revision: 58946

Modified:
   grass/trunk/gui/wxpython/lmgr/frame.py
Log:
wxGUI: allow stop editing from layer manager toolbar


Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2014-02-07 23:13:35 UTC (rev 58945)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2014-02-07 23:23:15 UTC (rev 58946)
@@ -791,8 +791,17 @@
         if not dcmd:
             return
         
-        tree.OnStartEditing(None)
+        digitToolbar = self.GetMapDisplay().GetToolbar('vdigit')
+        if digitToolbar:
+            stopOnly = False
+            if mapLayer is digitToolbar.GetLayer():
+                stopOnly = True
+            tree.OnStopEditing(None) # TODO: change to signal
+            if stopOnly:
+                return
         
+        tree.OnStartEditing(None) # TODO: change to signal
+        
     def OnRunScript(self, event):
         """!Run user-defined script"""
         # open dialog and choose script file



More information about the grass-commit mailing list