summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-10-06 23:41:43 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-10-06 23:41:43 (GMT)
commitd7fe798e022884dcbc58844e686a7d4fd39cf027 (patch)
treea723168c9150bb43772337a40d371641cc682262 /src/declarative
parent87580b48d0fa45bd8fd45ea9e5f222b10ce087ed (diff)
parente0eca3530d566200da46bb5d52abb76fcd98a2f8 (diff)
downloadQt-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
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/util/qmlstateoperations.cpp7
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) {