diff options
author | mae <qt-info@nokia.com> | 2009-06-18 09:52:54 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-17 09:47:17 (GMT) |
commit | 4652f0e0a03083b5baa1488237084333b134c516 (patch) | |
tree | af9648d790a07598040e6cec123bc4d681fb7b8e /src/gui | |
parent | 11e010c1b72c5309cff4123a6835414283530d74 (diff) | |
download | Qt-4652f0e0a03083b5baa1488237084333b134c516.zip Qt-4652f0e0a03083b5baa1488237084333b134c516.tar.gz Qt-4652f0e0a03083b5baa1488237084333b134c516.tar.bz2 |
Fix accidental selection of popup items under the mouse in QComboBox
If the widget under mouse is hidden, Qt can generate a synthetic mouse move
event which gets delivered to the already hidden widget. This can then result
in the wrong item being selected.
Workaround: in QListView, ignore mouse move events when the widget is hidden.
Reviewed-by: Denis
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemviews/qlistview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index d410a57..cc6277e 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -827,6 +827,8 @@ void QListView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e */ void QListView::mouseMoveEvent(QMouseEvent *e) { + if (!isVisible()) + return; Q_D(QListView); QAbstractItemView::mouseMoveEvent(e); if (state() == DragSelectingState |