Skip to content

Commit

Permalink
[declarative] Take spacing into account when releasing delegates.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjones committed Nov 1, 2013
1 parent baed985 commit b001763
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qtdeclarative/src/quick/items/qquicklistview.cpp
Expand Up @@ -713,7 +713,7 @@ bool QQuickListViewPrivate::removeNonVisibleItems(qreal bufferFrom, qreal buffer
// over by refill().
int index = 0;
while (visibleItems.count() > 1 && index < visibleItems.count()
&& (item = visibleItems.at(index)) && item->endPosition() < bufferFrom) {
&& (item = visibleItems.at(index)) && item->endPosition() + spacing < bufferFrom) {
if (item->attached->delayRemove())
break;

Expand Down Expand Up @@ -745,7 +745,7 @@ bool QQuickListViewPrivate::removeNonVisibleItems(qreal bufferFrom, qreal buffer
}
}

while (visibleItems.count() > 1 && (item = visibleItems.last()) && item->position() > bufferTo) {
while (visibleItems.count() > 1 && (item = visibleItems.last()) && item->position() - spacing > bufferTo) {
if (item->attached->delayRemove())
break;
#ifdef DEBUG_DELEGATE_LIFECYCLE
Expand Down

0 comments on commit b001763

Please sign in to comment.