diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-07-26 09:14:44 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-07-26 13:21:16 +0200 |
commit | 75d8ebb3e6925f500ddeefe2ab491be2ae83264c (patch) | |
tree | 6874c91386434f4a1934a9555a3f1d5daf69434c /src/quick/items/qquickpathview.cpp | |
parent | fcb40ff6d71f4561401e6b2bd4d7fc706fff8eee (diff) | |
parent | ba8416b80f42c81387170620472194e7a76429b8 (diff) |
Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
src/qml/compiler/qv4ssa.cpp
src/qml/jsruntime/qv4arrayobject.cpp
src/qml/jsruntime/qv4engine.cpp
Change-Id: Ie3ef6202b6a3a8521971e1be10c40c6a2db6989c
Diffstat (limited to 'src/quick/items/qquickpathview.cpp')
-rw-r--r-- | src/quick/items/qquickpathview.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index de5ed99640..efce244f7d 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -104,6 +104,7 @@ QQuickPathViewPrivate::QQuickPathViewPrivate() , stealMouse(false), ownModel(false), interactive(true), haveHighlightRange(true) , autoHighlight(true), highlightUp(false), layoutScheduled(false) , moving(false), flicking(false), dragging(false), inRequest(false), delegateValidated(false) + , inRefill(false) , dragMargin(0), deceleration(100), maximumFlickVelocity(QML_FLICK_DEFAULTMAXVELOCITY) , moveOffset(this, &QQuickPathViewPrivate::setAdjustedOffset), flickDuration(0) , firstIndex(-1), pathItems(-1), requestedIndex(-1), cacheSize(0), requestedZ(0) @@ -1873,11 +1874,18 @@ void QQuickPathView::refill() { Q_D(QQuickPathView); + if (d->inRefill) { + d->scheduleLayout(); + return; + } + d->layoutScheduled = false; if (!d->isValid() || !isComponentComplete()) return; + d->inRefill = true; + bool currentVisible = false; int count = d->pathItems == -1 ? d->modelCount : qMin(d->pathItems, d->modelCount); @@ -2010,6 +2018,8 @@ void QQuickPathView::refill() } while (d->itemCache.count()) d->releaseItem(d->itemCache.takeLast()); + + d->inRefill = false; } void QQuickPathView::modelUpdated(const QQmlChangeSet &changeSet, bool reset) |