summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-08-02 23:45:20 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-08-02 23:45:20 (GMT)
commit651b7aa72052faa90b3a268f00f82d56460166d3 (patch)
tree4cc04da553fef0c24a9861fbb387a933b134051e /src
parent999fb3b9e3d1fff3114713b2c892ec1cd49fce04 (diff)
downloadQt-651b7aa72052faa90b3a268f00f82d56460166d3.zip
Qt-651b7aa72052faa90b3a268f00f82d56460166d3.tar.gz
Qt-651b7aa72052faa90b3a268f00f82d56460166d3.tar.bz2
Items marked for removal should be excluded from section updates.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxlistview.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index f976aec..1e75026 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -697,9 +697,11 @@ void QFxListViewPrivate::updateSections()
if (visibleIndex > 0)
prevSection = sectionAt(visibleIndex-1);
for (int i = 0; i < visibleItems.count(); ++i) {
- QFxListViewAttached *attached = visibleItems.at(i)->attached;
- attached->setPrevSection(prevSection);
- prevSection = attached->section();
+ if (visibleItems.at(i)->index != -1) {
+ QFxListViewAttached *attached = visibleItems.at(i)->attached;
+ attached->setPrevSection(prevSection);
+ prevSection = attached->section();
+ }
}
}
}
@@ -1528,6 +1530,7 @@ void QFxListView::itemsRemoved(int modelIndex, int count)
d->updateCurrent(qMin(modelIndex, d->model->count()-1));
}
d->layout();
+ d->updateSections();
emit countChanged();
return;
}
@@ -1590,6 +1593,7 @@ void QFxListView::itemsRemoved(int modelIndex, int count)
} else {
// Correct the positioning of the items
d->layout();
+ d->updateSections();
}
emit countChanged();