diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-11-01 13:03:22 +0100 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@qt.io> | 2017-11-03 08:27:29 +0000 |
commit | a7880a0c92323ccb2f297a39a993a87e20d65e9c (patch) | |
tree | 64002c86e06fd5a1c8fc8a5532c3d2f26eb32346 /src | |
parent | eb2265d4c89b64c571f276e628b751abac29f895 (diff) |
ListView: don't stop moving the highlight because of model updates
In QQuickItemViewPrivate::applyModelChanges(), if
moveReason = QQuickItemViewPrivate::Other,
then QQuickItemView::trackedPositionChanged() will fail to call
d->setPosition(pos), which is normally what keeps the Flickable
moving for a while. Leave the reason as-is (it will be SetIndex in
this case), so as not to forget that we were actually trying to move
down. Updating the model was just a side-effect of that: either
because some QML code was trying to append to the model or because
fetchMore() was called.
Task-number: QTBUG-61269
Task-number: QTBUG-62864
Change-Id: I3fd402469950d6c12e6a8d6e42be83ea4f54776a
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickitemview.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp index 9038f7cde4..8f3fe9f0f2 100644 --- a/src/quick/items/qquickitemview.cpp +++ b/src/quick/items/qquickitemview.cpp @@ -1979,7 +1979,6 @@ bool QQuickItemViewPrivate::applyModelChanges(ChangeResult *totalInsertionResult } updateUnrequestedIndexes(); - moveReason = QQuickItemViewPrivate::Other; FxViewItem *prevVisibleItemsFirst = visibleItems.count() ? *visibleItems.constBegin() : 0; int prevItemCount = itemCount; |