diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-06-27 10:53:29 +1000 |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-06-27 10:53:29 +1000 |
commit | 7f967bccc3e996ef5fd13271366a5e48dd03e19e (patch) | |
tree | b71926e8a49c883619fe25e8e90eda986d9336db | |
parent | 024c2942338efd02f9464ed1eebc75f941cddc90 (diff) |
Fix mapping when items all items are removed from an append range.
Don't transform an emptied append ranges into a null range, as logic
elsewhere assumes a range cannot be both null and appended to.
-rw-r--r-- | src/declarative/util/qdeclarativelistcompositor.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativelistcompositor.cpp b/src/declarative/util/qdeclarativelistcompositor.cpp index 2e75336ac1..5f613f811d 100644 --- a/src/declarative/util/qdeclarativelistcompositor.cpp +++ b/src/declarative/util/qdeclarativelistcompositor.cpp @@ -301,7 +301,11 @@ void QDeclarativeListCompositor::removeAt(int index, int count) internalCount -= removeCount; if (range->count == 0) { - if (range->prepend()) { + if (range->append()) { + range = insert(range, QDeclarativeCompositeRange( + range->list, range->index, removeCount, (range->flags & ~Append) | Null)); + range->index += removeCount; + } else if (range->prepend()) { range->flags |= Null; range->count = removeCount; } else { |