summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativegridview.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-07-14 05:32:32 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-07-14 05:32:32 (GMT)
commit9adc85fdfa0af2b6948408932188ee1b79247fa6 (patch)
tree42e472c72c1cd4a51383ff948e16eec970ae625f /src/declarative/graphicsitems/qdeclarativegridview.cpp
parent7bd9e6c5805ab78c68161bec20c225965ea59ddb (diff)
downloadQt-9adc85fdfa0af2b6948408932188ee1b79247fa6.zip
Qt-9adc85fdfa0af2b6948408932188ee1b79247fa6.tar.gz
Qt-9adc85fdfa0af2b6948408932188ee1b79247fa6.tar.bz2
Position GridView and ListView footer correctly when model cleared.
Task-number: QTBUG-12167
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativegridview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index dce6f0e..14a4f08 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2438,8 +2438,11 @@ void QDeclarativeGridView::itemsRemoved(int modelIndex, int count)
if (removedVisible && d->visibleItems.isEmpty()) {
d->timeline.clear();
d->setPosition(0);
- if (d->itemCount == 0)
+ if (d->itemCount == 0) {
+ d->updateHeader();
+ d->updateFooter();
update();
+ }
}
emit countChanged();