Author: johannes
Date: 2007-06-12 08:33:57 -0500 (Tue, 12 Jun 2007)
New Revision: 9708
Modified:
trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py
Log:
Do not move focus into a dropdown when entering query mode
Modified: trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py 2007-06-12 12:49:01 UTC
(rev 9707)
+++ trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py 2007-06-12 13:33:57 UTC
(rev 9708)
@@ -719,12 +719,22 @@
# -------------------------------------------------------------------------
def _ui_set_choices_(self, choices):
- self.clear()
- for item in choices:
- self.insertItem(item)
+ # Make sure to block any TextChanged events while recreating the list
+ # of available choices. This would set the foucs into control as well
+ # as having an invalid value set.
+ old = self.ui_widget._block_change_
+ try:
+ self.ui_widget._block_change_ = True
+ self.clear()
+ for item in choices:
+ self.insertItem(item)
+ finally:
+ self.ui_widget._block_change_ = old
+
+
# =============================================================================
# Dropdown widgets
# =============================================================================
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue