summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativelistview.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-06-03 01:30:57 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-06-03 01:30:57 (GMT)
commit8aaeff9fb126021432e469899534e87a107c8b2d (patch)
tree35fdccbee32cdac1c87775916e160c084e59e97d /src/declarative/graphicsitems/qdeclarativelistview.cpp
parentcd35a0656b5aebd9cdd54c1b1555b40d90a07fd1 (diff)
downloadQt-8aaeff9fb126021432e469899534e87a107c8b2d.zip
Qt-8aaeff9fb126021432e469899534e87a107c8b2d.tar.gz
Qt-8aaeff9fb126021432e469899534e87a107c8b2d.tar.bz2
Keep ListView highlight in sync when currentItem changes geometry.
Task-number: QTBUG-11110
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 023d663..dbd1976 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