diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-06-03 11:30:57 +1000 |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-06-03 11:30:57 +1000 |
commit | 8aaeff9fb126021432e469899534e87a107c8b2d (patch) | |
tree | 35fdccbee32cdac1c87775916e160c084e59e97d /src/declarative/graphicsitems | |
parent | cd35a0656b5aebd9cdd54c1b1555b40d90a07fd1 (diff) | |
download | qt4-tools-8aaeff9fb126021432e469899534e87a107c8b2d.tar.gz |
Keep ListView highlight in sync when currentItem changes geometry.
Task-number: QTBUG-11110
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 023d663e84..dbd19768cf 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -427,6 +427,8 @@ public: scheduleLayout(); } } + if (currentItem && currentItem->item == item) + updateHighlight(); if (trackedItem && trackedItem->item == item) q->trackedPositionChanged(); } @@ -1103,7 +1105,9 @@ void QDeclarativeListViewPrivate::updateHeader() void QDeclarativeListViewPrivate::fixupPosition() { - moveReason = Other; + if ((haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) + || snapMode != QDeclarativeListView::NoSnap) + moveReason = Other; if (orient == QDeclarativeListView::Vertical) fixupY(); else |