summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 6be49ba..450b6af 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -183,6 +183,7 @@ public:
, ownModel(false), wrap(false), autoHighlight(true), haveHighlightRange(false)
, correctFlick(false), inFlickCorrection(false), lazyRelease(false)
, deferredRelease(false), layoutScheduled(false), currentIndexCleared(false)
+ , inViewportMoved(false)
, minExtentDirty(true), maxExtentDirty(true)
{}
@@ -503,6 +504,7 @@ public:
bool deferredRelease : 1;
bool layoutScheduled : 1;
bool currentIndexCleared : 1;
+ bool inViewportMoved : 1;
mutable bool minExtentDirty : 1;
mutable bool maxExtentDirty : 1;
};
@@ -2281,6 +2283,10 @@ void QDeclarativeListView::viewportMoved()
QDeclarativeFlickable::viewportMoved();
if (!d->itemCount)
return;
+ // Recursion can occur due to refill changing the content size.
+ if (d->inViewportMoved)
+ return;
+ d->inViewportMoved = true;
d->lazyRelease = true;
refill();
if (d->flickingHorizontally || d->flickingVertically || d->movingHorizontally || d->movingVertically)
@@ -2294,6 +2300,7 @@ void QDeclarativeListView::viewportMoved()
pos = viewPos + d->highlightRangeEnd - d->highlight->size();
if (pos < viewPos + d->highlightRangeStart)
pos = viewPos + d->highlightRangeStart;
+ d->highlightPosAnimator->stop();
d->highlight->setPosition(qRound(pos));
// update current index
@@ -2341,6 +2348,7 @@ void QDeclarativeListView::viewportMoved()
}
d->inFlickCorrection = false;
}
+ d->inViewportMoved = false;
}
qreal QDeclarativeListView::minYExtent() const