diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-19 10:41:57 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-19 10:43:14 (GMT) |
commit | 83b8d1aef2a840838bbe530794e1dd004e3a22d5 (patch) | |
tree | e4044e9df4ac15f28d45e98867d8c4c8a804d6da /src/gui/itemviews | |
parent | 78b2e9421c47371b68f4c65a181a077ba3a226ac (diff) | |
download | Qt-83b8d1aef2a840838bbe530794e1dd004e3a22d5.zip Qt-83b8d1aef2a840838bbe530794e1dd004e3a22d5.tar.gz Qt-83b8d1aef2a840838bbe530794e1dd004e3a22d5.tar.bz2 |
clicking on a non focused ItemView would change the cirrent item twice
Task-number: QTBUG-8086
Reviewed-by: gabi
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index dd9a7e6..0f99949 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -2090,7 +2090,7 @@ void QAbstractItemView::focusInEvent(QFocusEvent *event) bool autoScroll = d->autoScroll; d->autoScroll = false; QModelIndex index = moveCursor(MoveNext, Qt::NoModifier); // first visible index - if (index.isValid() && d->isIndexEnabled(index)) + if (index.isValid() && d->isIndexEnabled(index) && event->reason() != Qt::MouseFocusReason) selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate); d->autoScroll = autoScroll; } |