summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativegridview.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-10 06:34:58 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-10 06:34:58 (GMT)
commit7b29dc7daa035a351ba10dcfb879bc3f70434f63 (patch)
treeb92f01415e3cd2f28c11209cba1020734f848e61 /src/declarative/graphicsitems/qdeclarativegridview.cpp
parentb0fb09d29675f701f02fe5bf91fe64ffd0008cf6 (diff)
downloadQt-7b29dc7daa035a351ba10dcfb879bc3f70434f63.zip
Qt-7b29dc7daa035a351ba10dcfb879bc3f70434f63.tar.gz
Qt-7b29dc7daa035a351ba10dcfb879bc3f70434f63.tar.bz2
Ensure currentIndex NOTIFY is emitted when currentIndex changes due to model change.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativegridview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index af22e08..e66bcf6 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1807,6 +1807,7 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
d->currentIndex += count;
if (d->currentItem)
d->currentItem->index = d->currentIndex;
+ emit currentIndexChanged();
}
d->scheduleLayout();
emit countChanged();
@@ -1889,6 +1890,7 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
d->currentItem->index = d->currentIndex;
d->currentItem->setPosition(d->colPosAt(d->currentIndex), d->rowPosAt(d->currentIndex));
}
+ emit currentIndexChanged();
}
// everything is in order now - emit add() signal