summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qabstractitemview.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-13 18:55:05 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-13 18:55:05 (GMT)
commit7d1e48639d6d3897e66779f22fe02d17d6c38707 (patch)
tree7abc16568274e1f54c976f890e92d73f7a00160c /src/gui/itemviews/qabstractitemview.cpp
parent20e0e7a849d70139f9106f60c78fd0c736ec3c4b (diff)
parente1b03bac22f87edbbe78eba366966259be6eb0ed (diff)
downloadQt-7d1e48639d6d3897e66779f22fe02d17d6c38707.zip
Qt-7d1e48639d6d3897e66779f22fe02d17d6c38707.tar.gz
Qt-7d1e48639d6d3897e66779f22fe02d17d6c38707.tar.bz2
Merge branch '4.6'
Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
Diffstat (limited to 'src/gui/itemviews/qabstractitemview.cpp')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index f447989..cbd9a8a 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -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)