aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitemview.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-04-11 16:22:52 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-13 08:07:16 +0200
commit96c0e7e576b4b9a31bf7df362e26ebbc64f726f9 (patch)
tree0cae848593288b6db2c304a323aeb84671e33a80 /src/quick/items/qquickitemview.cpp
parentf24f682c83ee08f1ceffc935def477e8a649e38a (diff)
Don't ignore model changes when the ListView scroll position changes.
If there are pending changes when the ListView viewport changes then do a full layout instead of a refill. Likewise for GridView and when animations finish or the cacheBuffer size changes. Change-Id: I57a2b01fee5729381558af366dad24ba26c223ef Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/quick/items/qquickitemview.cpp')
-rw-r--r--src/quick/items/qquickitemview.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
index 209d30aa74..64c05aab92 100644
--- a/src/quick/items/qquickitemview.cpp
+++ b/src/quick/items/qquickitemview.cpp
@@ -442,7 +442,7 @@ void QQuickItemView::setCacheBuffer(int b)
d->buffer = b;
if (isComponentComplete()) {
d->bufferMode = QQuickItemViewPrivate::BufferBefore | QQuickItemViewPrivate::BufferAfter;
- d->refill();
+ d->refillOrLayout();
}
emit cacheBufferChanged();
}
@@ -1075,7 +1075,7 @@ void QQuickItemView::animStopped()
{
Q_D(QQuickItemView);
d->bufferMode = QQuickItemViewPrivate::BufferBefore | QQuickItemViewPrivate::BufferAfter;
- d->refill();
+ d->refillOrLayout();
if (d->haveHighlightRange && d->highlightRange == QQuickItemView::StrictlyEnforceRange)
d->updateHighlight();
}
@@ -1777,7 +1777,7 @@ void QQuickItemViewPrivate::layout()
bool QQuickItemViewPrivate::applyModelChanges(ChangeResult *totalInsertionResult, ChangeResult *totalRemovalResult)
{
Q_Q(QQuickItemView);
- if (!q->isComponentComplete() || (!currentChanges.hasPendingChanges() && !bufferedChanges.hasPendingChanges() && !runDelayedRemoveTransition) || disableLayout)
+ if (!q->isComponentComplete() || !hasPendingChanges() || disableLayout)
return false;
disableLayout = true;