summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativepathview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepathview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 001d5d5b..c902e1c8 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -1468,8 +1468,13 @@ void QDeclarativePathView::itemsInserted(int modelIndex, int count)
{
//XXX support animated insertion
Q_D(QDeclarativePathView);
- if (!d->isValid() || !isComponentComplete())
+ if (!d->isValid())
+ return;
+
+ if (!isComponentComplete()) {
+ emit countChanged();
return;
+ }
if (d->modelCount) {
d->itemCache += d->items;
@@ -1498,9 +1503,14 @@ void QDeclarativePathView::itemsRemoved(int modelIndex, int count)
{
//XXX support animated removal
Q_D(QDeclarativePathView);
- if (!d->model || !d->modelCount || !d->model->isValid() || !d->path || !isComponentComplete())
+ if (!d->model || !d->modelCount || !d->model->isValid() || !d->path)
return;
+ if (!isComponentComplete()) {
+ emit countChanged();
+ return;
+ }
+
// fix current
bool currentChanged = false;
if (d->currentIndex >= modelIndex + count) {