diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-10-06 23:41:43 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-10-06 23:41:43 (GMT) |
commit | d7fe798e022884dcbc58844e686a7d4fd39cf027 (patch) | |
tree | a723168c9150bb43772337a40d371641cc682262 | |
parent | 87580b48d0fa45bd8fd45ea9e5f222b10ce087ed (diff) | |
parent | e0eca3530d566200da46bb5d52abb76fcd98a2f8 (diff) | |
download | Qt-d7fe798e022884dcbc58844e686a7d4fd39cf027.zip Qt-d7fe798e022884dcbc58844e686a7d4fd39cf027.tar.gz Qt-d7fe798e022884dcbc58844e686a7d4fd39cf027.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | src/declarative/util/qmlstateoperations.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index a9a5bd5..921aa6c 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -208,9 +208,12 @@ void QmlParentChange::saveOriginals() d->origParent = d->target->parentItem(); - //try to determine the items original stack position so we can restore it - if (!d->origParent) + if (!d->origParent) { d->origStackBefore = 0; + return; + } + + //try to determine the item's original stack position so we can restore it int siblingIndex = ((AccessibleFxItem*)d->target)->siblingIndex() + 1; QList<QGraphicsItem*> children = d->origParent->childItems(); for (int i = 0; i < children.count(); ++i) { |