dabo Commit
Revision 5064
Date: 2009-02-19 16:48:32 -0800 (Thu, 19 Feb 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5064

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

Log:
Space and other non-alnum keys *should* be searched on. Strings like
this weren't working in the incremental search:

"San Benito County"
"493-2939-1020"

As the user typed the space or the dash, the search would reset.




Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2009-02-16 16:00:35 UTC (rev 5063)
+++ trunk/dabo/ui/uiwx/dGrid.py 2009-02-20 00:48:32 UTC (rev 5064)
@@ -3423,15 +3423,14 @@
                        # keycode not in ascii range
                        return
 
-               if char.isspace() or keyCode in (dKeys.key_Left, 
dKeys.key_Right,
+               if 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.
+                       # Enter, Tab, and Arrow Keys shouldn't be searched on.
                        return
 
-               if (self.Searchable and 
self.Columns[self.CurrentColumn].Searchable) \
-                               and char.isalnum():
+               if (self.Searchable and 
self.Columns[self.CurrentColumn].Searchable):
                        self.addToSearchStr(char)
                        # For some reason, without this the key happens twice
                        evt.stop()



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to