diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-09-30 07:08:41 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-09-30 07:08:41 (GMT) |
commit | 20961991aa3a29e5c3bff1758bbcb5ca85232944 (patch) | |
tree | 260083d63243b1f882e74d75c2f37e5877eb0478 /src/declarative | |
parent | 4dc235f50a686d40bc63d7108027145f23d2c18a (diff) | |
download | Qt-20961991aa3a29e5c3bff1758bbcb5ca85232944.zip Qt-20961991aa3a29e5c3bff1758bbcb5ca85232944.tar.gz Qt-20961991aa3a29e5c3bff1758bbcb5ca85232944.tar.bz2 |
Fix repeater item ordering
Note that while QT-2241 exists there will still be an issue with the
specific usecase of placing a repeater inside a positioner
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/fx/qfxrepeater.cpp | 15 | ||||
-rw-r--r-- | src/declarative/fx/qfxtextedit.cpp | 2 |
2 files changed, 2 insertions, 15 deletions
diff --git a/src/declarative/fx/qfxrepeater.cpp b/src/declarative/fx/qfxrepeater.cpp index 5ef7b10..bc34839 100644 --- a/src/declarative/fx/qfxrepeater.cpp +++ b/src/declarative/fx/qfxrepeater.cpp @@ -282,26 +282,13 @@ void QFxRepeater::regenerate() if (!d->model || !d->model->count() || !d->model->isValid() || !parentItem() || !isComponentComplete()) return; - //In order to do the insertion like the examples, we have to be at the - //same point in the childItems() list. Temporary measure until we think of something better - int pos = parentItem()->childItems().indexOf(this); - Q_ASSERT(pos != -1); - QList<QGraphicsItem*> otherChildren; - for (int ii = pos+1; ii < parentItem()->childItems().count(); ii++){ - QGraphicsItem* otherChild = parentItem()->childItems()[ii]; - otherChildren << otherChild; - otherChild->setParentItem(0); - } - for (int ii = 0; ii < count(); ++ii) { QFxItem *item = d->model->item(ii); if (item) { item->setParent(parentItem()); + item->stackBefore(this); d->deletables << item; } } - - foreach(QGraphicsItem* other, otherChildren) - other->setParentItem(parentItem()); } QT_END_NAMESPACE diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index 935ccb7..f4c2e4c 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -767,7 +767,7 @@ bool QFxTextEdit::event(QEvent *event) Q_D(QFxTextEdit); if (event->type() == QEvent::ShortcutOverride) { d->control->processEvent(event, QPointF(0, 0)); - return true; + return event->isAccepted(); } return QFxPaintedItem::event(event); } |