diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-06-11 15:52:13 +1000 |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-06-11 15:52:13 +1000 |
commit | 6e34e119551a7e20e7202d819568d537458fb776 (patch) | |
tree | 9436a0b6c09f590325f9b5b87fa39e99d4c51141 /src/declarative/graphicsitems | |
parent | b90283fd887898a3eda62e856bec7f8a34e242ac (diff) | |
download | qt4-tools-6e34e119551a7e20e7202d819568d537458fb776.tar.gz |
ListView.onRemove animation is not played when the list has only one item.
Task-number: QTBUG-11285
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index dc2bbd9da8..3792595d56 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 d8d317c6f5..dcf18afe17 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; |