[GRASS-SVN] r63287 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 29 07:21:34 PST 2014
Author: annakrat
Date: 2014-11-29 07:21:34 -0800 (Sat, 29 Nov 2014)
New Revision: 63287
Modified:
grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
wxGUI/gselect: try to catch different key events, it's unclear which events are emitted from which part of the widget, on the same version of Ubuntu and wxPython, I get different behavior
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2014-11-29 14:43:31 UTC (rev 63286)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2014-11-29 15:21:34 UTC (rev 63287)
@@ -110,9 +110,15 @@
def OnKeyDown(self, event):
"""Open popup and send key events to the tree."""
- if event.GetKeyCode() == wx.WXK_DOWN:
- self.ShowPopup()
- event.Skip()
+ if self.IsPopupShown():
+ # on some configurations we get key down, with some only key up
+ # so we are trying to catch either key up or down
+ # this mess shouldn't be necessary with wxPython 3
+ self.tcp.OnKeyUp(event)
+ else:
+ if event.GetKeyCode() == wx.WXK_DOWN:
+ self.ShowPopup()
+ event.Skip()
def SetElementList(self, type, mapsets = None):
"""Set element list
More information about the grass-commit
mailing list