summaryrefslogtreecommitdiff
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-06-03 11:30:57 +1000
committerMartin Jones <martin.jones@nokia.com>2010-06-03 11:30:57 +1000
commit8aaeff9fb126021432e469899534e87a107c8b2d (patch)
tree35fdccbee32cdac1c87775916e160c084e59e97d /src/declarative/graphicsitems
parentcd35a0656b5aebd9cdd54c1b1555b40d90a07fd1 (diff)
downloadqt4-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.cpp6
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