if (currentItem && currentItem->item == item) {
// don't allow item movement transitions to trigger a re-layout and
// start new transitions
- bool prevDisableLayout = disableLayout;
- if (!disableLayout) {
+ bool prevInLayout = inLayout;
+ if (!inLayout) {
FxViewItem *actualItem = transitioner ? visibleItem(currentIndex) : 0;
if (actualItem && actualItem->transitionRunning())
- disableLayout = true;
+ inLayout = true;
}
updateHighlight();
- disableLayout = prevDisableLayout;
+ inLayout = prevInLayout;
}
if (trackedItem && trackedItem->item == item)
polish();
}
} else {
- if (d->disableLayout) {
+ if (d->inLayout) {
d->bufferedChanges.prepare(d->currentIndex, d->itemCount);
d->bufferedChanges.applyChanges(changeSet);
} else {
, transitioner(0)
, minExtent(0), maxExtent(0)
, ownModel(false), wrap(false)
- , disableLayout(false), inViewportMoved(false), forceLayout(false), currentIndexCleared(false)
+ , inLayout(false), inViewportMoved(false), forceLayout(false), currentIndexCleared(false)
, haveHighlightRange(false), autoHighlight(true), highlightRangeStartValid(false), highlightRangeEndValid(false)
, fillCacheBuffer(false), inRequest(false), requestedAsync(false)
, runDelayedRemoveTransition(false)
void QQuickItemViewPrivate::layout()
{
Q_Q(QQuickItemView);
- if (disableLayout)
+ if (inLayout)
return;
+ inLayout = true;
+
if (!isValid() && !visibleItems.count()) {
clear();
setPosition(contentStartOffset());
if (transitioner)
transitioner->setPopulateTransitionEnabled(false);
+ inLayout = false;
return;
}
fillCacheBuffer = false;
refill();
}
+ inLayout = false;
return;
}
forceLayout = false;
}
runDelayedRemoveTransition = false;
+ inLayout = false;
}
bool QQuickItemViewPrivate::applyModelChanges(ChangeResult *totalInsertionResult, ChangeResult *totalRemovalResult)
{
Q_Q(QQuickItemView);
- if (!q->isComponentComplete() || !hasPendingChanges() || disableLayout)
+ if (!q->isComponentComplete() || !hasPendingChanges())
return false;
- disableLayout = true;
-
if (bufferedChanges.hasPendingChanges()) {
currentChanges.applyBufferedChanges(bufferedChanges);
bufferedChanges.reset();
if (!visibleAffected && viewportChanged)
updateViewport();
- disableLayout = false;
return visibleAffected;
}