diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-19 07:39:11 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-19 07:39:11 (GMT) |
commit | 62ca76e14166b8f4c16e7cd9c285d373e460ebf7 (patch) | |
tree | 29f757aef972b0261718aa6dad106509756469fa | |
parent | 55ffc0f27638485803f29d985a57deb5b3db4584 (diff) | |
download | Qt-62ca76e14166b8f4c16e7cd9c285d373e460ebf7.zip Qt-62ca76e14166b8f4c16e7cd9c285d373e460ebf7.tar.gz Qt-62ca76e14166b8f4c16e7cd9c285d373e460ebf7.tar.bz2 |
Setting stacking order from top to bottom seems to work better.
Task-number: QTBUG-9182
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativerepeater.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index b9696c8..e8f9b24 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -358,14 +358,10 @@ void QDeclarativeRepeater::itemsMoved(int from, int to, int count) removed << d->deletables.takeAt(from); for (int i = 0; i < count; ++i) d->deletables.insert(to + i, removed.at(i)); - for (int i = 0; i < d->model->count(); ++i) { - if (i < from && i < to) - continue; - QDeclarativeItem *item = d->deletables.at(i); - if (i < d->deletables.count()-1) - item->stackBefore(d->deletables.at(i+1)); - else - item->stackBefore(this); + d->deletables.last()->stackBefore(this); + for (int i = d->model->count()-1; i > 0; --i) { + QDeclarativeItem *item = d->deletables.at(i-1); + item->stackBefore(d->deletables.at(i)); } } |