summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmltransitionmanager.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-11-19 02:41:19 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-11-19 02:41:19 (GMT)
commit8ca9ca77884229b04f3b48bb7fe085e56e3a9023 (patch)
tree31259940ee2ae678ec224854280b980a1a5cfe4e /src/declarative/util/qmltransitionmanager.cpp
parent6366969eaac962338424c49619a8664b03428985 (diff)
downloadQt-8ca9ca77884229b04f3b48bb7fe085e56e3a9023.zip
Qt-8ca9ca77884229b04f3b48bb7fe085e56e3a9023.tar.gz
Qt-8ca9ca77884229b04f3b48bb7fe085e56e3a9023.tar.bz2
Make sure we restore the base state correctly after the base state changes.
This worked correctly as long as there was a transition between the states. Now it works correctly with no transition as well.
Diffstat (limited to 'src/declarative/util/qmltransitionmanager.cpp')
-rw-r--r--src/declarative/util/qmltransitionmanager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/util/qmltransitionmanager.cpp b/src/declarative/util/qmltransitionmanager.cpp
index d1db9ec..ba726db 100644
--- a/src/declarative/util/qmltransitionmanager.cpp
+++ b/src/declarative/util/qmltransitionmanager.cpp
@@ -236,8 +236,11 @@ void QmlTransitionManager::transition(const QList<Action> &list,
action.property.write(action.toValue);
}
}
- if (!transition)
+ if (!transition) {
d->applyBindings();
+ if (d->state)
+ static_cast<QmlStatePrivate*>(QObjectPrivate::get(d->state))->complete();
+ }
}
void QmlTransitionManager::cancel()
@@ -262,7 +265,6 @@ void QmlTransitionManager::cancel()
}
d->bindingsList.clear();
d->completeList.clear();
-
}
QT_END_NAMESPACE