Author: johannes Date: 2007-02-21 09:58:15 -0600 (Wed, 21 Feb 2007) New Revision: 9393
Modified: trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py Log: Make sure to have the focus within a dropdown when using the wheel Modified: trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py =================================================================== --- trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py 2007-02-21 14:13:55 UTC (rev 9392) +++ trunk/gnue-forms/src/uidrivers/qt3/widgets/entry.py 2007-02-21 15:58:15 UTC (rev 9393) @@ -360,10 +360,8 @@ Keep the GF-Focus in sync with the QT3-focus """ - self._block_focus = True self.ui_widget._gfObject._event_set_focus(self.ui_widget.widgets.index( self.lookup)) - self._block_focus = False self.qt_class.focusInEvent(self, event) @@ -466,6 +464,8 @@ def __on_text_changed(self, value): if not self.ui_widget._block_change_: + if not self.hasFocus(): + self.setFocus() self.ui_widget._request('REPLACEVALUE', text=unicode(value), position=self.cursorPosition()) @@ -717,10 +717,15 @@ # ------------------------------------------------------------------------- def __on_activated(self, item_index): - self.ui_widget._request('REPLACEVALUE', - text=unicode(self.currentText())) + if not self.ui_widget._block_change_: + selected = unicode(self.currentText()) + if not self.hasFocus(): + self.setFocus() + self.ui_widget._request('REPLACEVALUE', text=selected) + + # ------------------------------------------------------------------------- # Implementation of virtual methods # ------------------------------------------------------------------------- _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue