summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslistview.cpp14
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;