[GRASS-SVN] r66578 - grass/branches/releasebranch_7_0/gui/wxpython/vnet

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 22 12:30:21 PDT 2015


Author: turek
Date: 2015-10-22 12:30:21 -0700 (Thu, 22 Oct 2015)
New Revision: 66578

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/vnet/toolbars.py
Log:
wx.vnet: fix adding points because of unregistered handler - temporary hack before r66434 will be backported

Modified: grass/branches/releasebranch_7_0/gui/wxpython/vnet/toolbars.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/vnet/toolbars.py	2015-10-22 14:13:51 UTC (rev 66577)
+++ grass/branches/releasebranch_7_0/gui/wxpython/vnet/toolbars.py	2015-10-22 19:30:21 UTC (rev 66578)
@@ -89,6 +89,18 @@
         pt_id = self.vnet_pts_mgr.GetSelected()
         self.vnet_pts_mgr.DeletePoint(pt_id)
 
+    def OnTool(self, event):
+        """Tool selected - overriden BaseToolbar method to avoid calling UnregisterAllHandlers 
+            through toggleToolChanged signal for certain buttons in the toolbar
+            It is temporary HACK before r66434 will be backported.
+        """
+        id = event.GetId()
+        if self.toolSwitcher:
+            
+            if  self.toolSwitcher.IsToolInGroup(id, 'mouseUse'):
+                self.toolSwitcher.ToolChanged(event.GetId())
+        
+        event.Skip()
 
 class MainToolbar(BaseToolbar):
     """Main toolbar



More information about the grass-commit mailing list