diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-08 01:20:59 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-08 01:20:59 (GMT) |
commit | 5a46054809b215ed685ce1388309ba947cec4d6f (patch) | |
tree | b2fc3010736908e3932f5759c878b53c40315315 /src/declarative | |
parent | 0c409e0b6c9b251ae539c9e545dd2e425af22a46 (diff) | |
download | Qt-5a46054809b215ed685ce1388309ba947cec4d6f.zip Qt-5a46054809b215ed685ce1388309ba947cec4d6f.tar.gz Qt-5a46054809b215ed685ce1388309ba947cec4d6f.tar.bz2 |
Fix item removal.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicslistview.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index dafbef8..26be7d8 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -2572,15 +2572,15 @@ void QmlGraphicsListView::itemsRemoved(int modelIndex, int count) d->updateCurrent(qMin(modelIndex, d->model->count()-1)); } - if (removedVisible) { - // update visibleIndex - for (it = d->visibleItems.begin(); it != d->visibleItems.end(); ++it) { - if ((*it)->index != -1) { - d->visibleIndex = (*it)->index; - break; - } + // update visibleIndex + for (it = d->visibleItems.begin(); it != d->visibleItems.end(); ++it) { + if ((*it)->index != -1) { + d->visibleIndex = (*it)->index; + break; } + } + if (removedVisible) { if (d->visibleItems.isEmpty()) { d->visibleIndex = 0; d->visiblePos = d->header ? d->header->size() : 0; |