[GRASS-SVN] r58524 - grass/trunk/gui/wxpython/gmodeler
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Dec 25 08:45:52 PST 2013
Author: martinl
Date: 2013-12-25 08:45:52 -0800 (Wed, 25 Dec 2013)
New Revision: 58524
Modified:
grass/trunk/gui/wxpython/gmodeler/frame.py
Log:
wxGUI/modeler: fix deleting objects by 'delete key'
Modified: grass/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py 2013-12-25 16:30:53 UTC (rev 58523)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py 2013-12-25 16:45:52 UTC (rev 58524)
@@ -1000,15 +1000,19 @@
self.SetScrollbars(20, 20, 2000/20, 2000/20)
- self.Bind(wx.EVT_CHAR, self.OnChar)
+ self.Bind(wx.EVT_KEY_UP, self.OnKeyUp)
+ self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
- def OnChar(self, event):
+ def OnKeyUp(self, event):
"""!Key pressed"""
kc = event.GetKeyCode()
- diagram = self.GetDiagram()
if kc == wx.WXK_DELETE:
self.RemoveSelected()
+ def OnLeftDown(self, evt):
+ self.SetFocus()
+ evt.Skip()
+
def RemoveSelected(self):
"""!Remove selected shapes"""
self.parent.ModelChanged()
More information about the grass-commit
mailing list