summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-06-11 05:52:13 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-06-11 05:52:13 (GMT)
commit6e34e119551a7e20e7202d819568d537458fb776 (patch)
tree9436a0b6c09f590325f9b5b87fa39e99d4c51141 /src
parentb90283fd887898a3eda62e856bec7f8a34e242ac (diff)
downloadQt-6e34e119551a7e20e7202d819568d537458fb776.zip
Qt-6e34e119551a7e20e7202d819568d537458fb776.tar.gz
Qt-6e34e119551a7e20e7202d819568d537458fb776.tar.bz2
ListView.onRemove animation is not played when the list has only one item.
Task-number: QTBUG-11285
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index dc2bbd9..3792595 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -603,7 +603,7 @@ void QDeclarativeGridViewPrivate::layout()
{
Q_Q(QDeclarativeGridView);
layoutScheduled = false;
- if (!isValid()) {
+ if (!isValid() && !visibleItems.count()) {
clear();
return;
}
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index d8d317c..dcf18af 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -737,7 +737,7 @@ void QDeclarativeListViewPrivate::layout()
{
Q_Q(QDeclarativeListView);
layoutScheduled = false;
- if (!isValid()) {
+ if (!isValid() && !visibleItems.count()) {
clear();
setPosition(0);
return;