diff options
author | Bill King <bking@trolltech.com> | 2010-01-12 02:45:42 (GMT) |
---|---|---|
committer | Bill King <bking@trolltech.com> | 2010-01-12 02:45:42 (GMT) |
commit | 7370dceadf969288a22c564728398cc7cb119d82 (patch) | |
tree | ad966ec292aa7dbf98bdff4289603082478579b0 /src/gui/itemviews/qabstractitemview.cpp | |
parent | 82e9af930bea96710d7df87f03d3f4f1a175dbd3 (diff) | |
parent | 7abb2cfdea14fa71aabcd79635aa8f407ed96186 (diff) | |
download | Qt-7370dceadf969288a22c564728398cc7cb119d82.zip Qt-7370dceadf969288a22c564728398cc7cb119d82.tar.gz Qt-7370dceadf969288a22c564728398cc7cb119d82.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src/gui/itemviews/qabstractitemview.cpp')
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index f447989..f852e67 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -146,9 +146,16 @@ void QAbstractItemViewPrivate::setHoverIndex(const QPersistentModelIndex &index) if (hover == index) return; - q->update(hover); //update the old one + if (selectionBehavior != QAbstractItemView::SelectRows) { + q->update(hover); //update the old one + q->update(index); //update the new one + } else { + QRect oldHoverRect = q->visualRect(hover); + QRect newHoverRect = q->visualRect(index); + viewport->update(QRect(0, newHoverRect.y(), viewport->width(), newHoverRect.height())); + viewport->update(QRect(0, oldHoverRect.y(), viewport->width(), oldHoverRect.height())); + } hover = index; - q->update(hover); //update the new one } void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index) |