dabo Commit
Revision 2491
Date: 2006-11-24 13:30:24 -0800 (Fri, 24 Nov 2006)
Author: paul

Changed:
U   trunk/dabo/ui/uiwx/dGrid.py

Log:
Fixed arrow keys, pageup/down, and home/end to work again in dGrid, instead
of being run through the incremental search. Please test that this doesn't
break searching cyrillic strings (it shouldn't), and I'll backport this to
stable as well.


Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2006-11-21 21:15:23 UTC (rev 2490)
+++ trunk/dabo/ui/uiwx/dGrid.py 2006-11-24 21:30:24 UTC (rev 2491)
@@ -3013,7 +3013,6 @@
                        # Can't search and edit at the same time
                        return
 
-#              keyCode = evt.EventData["keyCode"]
                keyCode = evt.EventData["unicodeKey"]
                try:
                        char = unichr(keyCode)
@@ -3021,11 +3020,13 @@
                        # keycode not in ascii range
                        return
 
-               if char.isspace():
+               if char.isspace() or keyCode in (dKeys.key_Left, 
dKeys.key_Right,
+                               dKeys.key_Up, dKeys.key_Down, dKeys.key_Pageup, 
dKeys.key_Pagedown,
+                               dKeys.key_Home, dKeys.key_End, dKeys.key_Prior, 
dKeys.key_Next) \
+                               or evt.EventData["hasModifiers"]:
+                       # Enter, Tab, Space and Arrow Keys shouldn't be 
searched on.
                        return
 
-#              if (self.Searchable and 
self.Columns[self.CurrentColumn].Searchable) \
-#                              and char.isalnum() and not evt.hasModifiers:
                if (self.Searchable and 
self.Columns[self.CurrentColumn].Searchable) \
                                and char.isalnum():
                        self.addToSearchStr(char)




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to