Explorar o código

wxGUI: allow stop editing from layer manager toolbar

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58946 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=11) %!d(string=hai) anos
pai
achega
76f00ace5d
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  1. 10 1
      gui/wxpython/lmgr/frame.py

+ 10 - 1
gui/wxpython/lmgr/frame.py

@@ -791,7 +791,16 @@ class GMFrame(wx.Frame):
         if not dcmd:
         if not dcmd:
             return
             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):
     def OnRunScript(self, event):
         """!Run user-defined script"""
         """!Run user-defined script"""