diff options
author | mae <qt-info@nokia.com> | 2009-06-18 11:52:54 +0200 |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-17 11:47:17 +0200 |
commit | 4652f0e0a03083b5baa1488237084333b134c516 (patch) | |
tree | af9648d790a07598040e6cec123bc4d681fb7b8e /src/gui/itemviews | |
parent | 11e010c1b72c5309cff4123a6835414283530d74 (diff) |
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/itemviews')
-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 d410a57333..cc6277e233 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 |