[GRASS-SVN] r59213 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 8 06:54:10 PST 2014


Author: turek
Date: 2014-03-08 06:54:10 -0800 (Sat, 08 Mar 2014)
New Revision: 59213

Modified:
   grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
coordinates select: avoid  getting warning message when button is unpressed

Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2014-03-08 13:41:51 UTC (rev 59212)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2014-03-08 14:54:10 UTC (rev 59213)
@@ -2156,10 +2156,11 @@
         
     def _onClick(self, event):
         """!Button for interacitve inserting of coordinates clicked"""
-        switcher = self._giface.GetMapDisplay().GetToolSwitcher()
-        switcher.ToolChanged(self.buttonInsCoords.GetId())
+
         self.mapWin = self._giface.GetMapWindow()
         if self.buttonInsCoords.GetToggle() and self.mapWin:
+            switcher = self._giface.GetMapDisplay().GetToolSwitcher()
+            switcher.ToolChanged(self.buttonInsCoords.GetId())
             if self.mapWin.RegisterMouseEventHandler(wx.EVT_LEFT_DOWN, 
                                                      self._onMapClickHandler,
                                                      'cross') == False:
@@ -2169,8 +2170,8 @@
             self._giface.GetMapDisplay().Raise()
         else:
             if self.mapWin and \
-                    self.mapWin.UnregisterMouseEventHandler(wx.EVT_LEFT_DOWN,  
-                                                            self._onMapClickHandler):
+               self.mapWin.UnregisterMouseEventHandler(wx.EVT_LEFT_DOWN,  
+                                                       self._onMapClickHandler):
                 self.registered = False
                 return
 



More information about the grass-commit mailing list