[GRASS-SVN] r39912 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 6 05:22:47 EST 2009


Author: martinl
Date: 2009-12-06 05:22:47 -0500 (Sun, 06 Dec 2009)
New Revision: 39912

Modified:
   grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py
   grass/trunk/gui/wxpython/gui_modules/toolbars.py
Log:
fix r39911


Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py	2009-12-06 10:11:30 UTC (rev 39911)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py	2009-12-06 10:22:47 UTC (rev 39912)
@@ -457,18 +457,18 @@
         vdigitToolbar = self.parent.toolbars['vdigit']
         ### vdigit
         if vdigitToolbar:
+            event = None
             if not shift:
-                event = None
                 if kc == ord('P'):
                     event = wx.CommandEvent(winid = vdigitToolbar.addPoint)
                     tool = vdigitToolbar.OnAddPoint
                 elif kc == ord('L'):
                     event = wx.CommandEvent(winid = vdigitToolbar.addLine)
                     tool = vdigitToolbar.OnAddLine
-                if event:
-                    vdigitToolbar.OnTool(event)
-                    # tool(event)
-                
+            if event:
+                vdigitToolbar.OnTool(event)
+                tool(event)
+        
     def OnPaint(self, event):
         """!
         Draw PseudoDC's to buffered paint DC

Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py	2009-12-06 10:11:30 UTC (rev 39911)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py	2009-12-06 10:22:47 UTC (rev 39912)
@@ -625,6 +625,9 @@
                 # cancel action
                 self.parent.MapWindow.OnMiddleDown(None)
         
+        # set focus
+        self.parent.MapWindow.SetFocus()
+        
     def OnAddPoint(self, event):
         """!Add point to the vector map Laier"""
         Debug.msg (2, "VDigitToolbar.OnAddPoint()")



More information about the grass-commit mailing list