summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-06-18 09:52:54 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-17 09:47:17 (GMT)
commit4652f0e0a03083b5baa1488237084333b134c516 (patch)
treeaf9648d790a07598040e6cec123bc4d681fb7b8e /src/gui
parent11e010c1b72c5309cff4123a6835414283530d74 (diff)
downloadQt-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.cpp2
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