Fixed bug in filters behavior on Windows
authorLaurent Bessard
Fri, 19 Apr 2013 00:55:40 +0200
changeset 2130 596e99202a15
parent 2129 f1d93f44570f
child 2131 504f18b3306a
Fixed bug in filters behavior on Windows
etherlab/ConfigEditor.py
--- a/etherlab/ConfigEditor.py	Thu Apr 18 00:48:32 2013 +0200
+++ b/etherlab/ConfigEditor.py	Fri Apr 19 00:55:40 2013 +0200
@@ -196,9 +196,11 @@
     def OnVariablesFilterKeyDown(self, event):
         if self.VariablesFilterFirstCharacter:
             keycode = event.GetKeyCode()
-            self.VariablesFilterFirstCharacter = False
-            if keycode not in NAVIGATION_KEYS:
-                self.VariablesFilter.SetValue("")
+            if keycode not in [wx.WXK_RETURN, 
+                               wx.WXK_NUMPAD_ENTER]:
+                self.VariablesFilterFirstCharacter = False
+                if keycode not in NAVIGATION_KEYS:
+                    self.VariablesFilter.SetValue("")
             if keycode not in [wx.WXK_DELETE, 
                                wx.WXK_NUMPAD_DELETE, 
                                wx.WXK_BACK]:
@@ -866,9 +868,11 @@
     def OnNodesFilterKeyDown(self, event):
         if self.NodesFilterFirstCharacter:
             keycode = event.GetKeyCode()
-            self.NodesFilterFirstCharacter = False
-            if keycode not in NAVIGATION_KEYS:
-                self.NodesFilter.SetValue("")
+            if keycode not in [wx.WXK_RETURN, 
+                               wx.WXK_NUMPAD_ENTER]:
+                self.NodesFilterFirstCharacter = False
+                if keycode not in NAVIGATION_KEYS:
+                    self.NodesFilter.SetValue("")
             if keycode not in [wx.WXK_DELETE, 
                                wx.WXK_NUMPAD_DELETE, 
                                wx.WXK_BACK]: