summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativegridview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativegridview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index c3e27e74..14e77ec6 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2759,8 +2759,10 @@ void QDeclarativeGridView::trackedPositionChanged()
void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
{
Q_D(QDeclarativeGridView);
- if (!isComponentComplete())
+ if (!isComponentComplete()) {
+ emit countChanged();
return;
+ }
int index = d->visibleItems.count() ? d->mapFromModel(modelIndex) : 0;
if (index < 0) {
@@ -2895,8 +2897,10 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
void QDeclarativeGridView::itemsRemoved(int modelIndex, int count)
{
Q_D(QDeclarativeGridView);
- if (!isComponentComplete())
+ if (!isComponentComplete()) {
+ emit countChanged();
return;
+ }
d->itemCount -= count;
bool currentRemoved = d->currentIndex >= modelIndex && d->currentIndex < modelIndex + count;