diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-19 04:06:02 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-19 04:06:02 (GMT) |
commit | f9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682 (patch) | |
tree | 65f3b637a19ff47fcc97e3f22deeae7d843cad17 /src/gui/itemviews | |
parent | 331ad8eb0aedb4baefcaf6f08a8e0ce440a32b06 (diff) | |
parent | 8a7de547942c9a660dfc45c176ea1a3027bbf99a (diff) | |
download | Qt-f9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682.zip Qt-f9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682.tar.gz Qt-f9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682.tar.bz2 |
Merge remote branch 'origin/4.7' into oslo-staging-1
Conflicts:
mkspecs/common/symbian/symbian.conf
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qsortfilterproxymodel.cpp | 4 | ||||
-rw-r--r-- | src/gui/itemviews/qtreeview.cpp | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index c6ad345..dce5c6a 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -1217,13 +1217,13 @@ void QSortFilterProxyModelPrivate::_q_sourceAboutToBeReset() { Q_Q(QSortFilterProxyModel); q->beginResetModel(); - invalidatePersistentIndexes(); - clear_mapping(); } void QSortFilterProxyModelPrivate::_q_sourceReset() { Q_Q(QSortFilterProxyModel); + invalidatePersistentIndexes(); + clear_mapping(); // All internal structures are deleted in clear() q->endResetModel(); update_source_sort_column(); diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 2764baa..b2457f3 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -1233,17 +1233,17 @@ bool QTreeView::viewportEvent(QEvent *event) int oldBranch = d->hoverBranch; d->hoverBranch = d->itemDecorationAt(he->pos()); if (oldBranch != d->hoverBranch) { - QModelIndex oldIndex = d->modelIndex(oldBranch), - newIndex = d->modelIndex(d->hoverBranch); - if (oldIndex != newIndex) { - QRect oldRect = visualRect(oldIndex); - QRect newRect = visualRect(newIndex); - oldRect.setLeft(oldRect.left() - d->indent); - newRect.setLeft(newRect.left() - d->indent); - //we need to paint the whole items (including the decoration) so that when the user - //moves the mouse over those elements they are updated - viewport()->update(oldRect); - viewport()->update(newRect); + //we need to paint the whole items (including the decoration) so that when the user + //moves the mouse over those elements they are updated + if (oldBranch >= 0) { + int y = d->coordinateForItem(oldBranch); + int h = d->itemHeight(oldBranch); + viewport()->update(QRect(0, y, viewport()->width(), h)); + } + if (d->hoverBranch >= 0) { + int y = d->coordinateForItem(d->hoverBranch); + int h = d->itemHeight(d->hoverBranch); + viewport()->update(QRect(0, y, viewport()->width(), h)); } } break; } |