summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlstategroup.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-11-25 04:33:05 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-11-25 04:37:34 (GMT)
commitb5dc7443889313acfa12cb83239cdf00f7a0e009 (patch)
tree457b734e134db3a22a688b6855679066f58b429c /src/declarative/util/qmlstategroup.cpp
parent3570cb083def4c91d147ceab561ea449646ab515 (diff)
downloadQt-b5dc7443889313acfa12cb83239cdf00f7a0e009.zip
Qt-b5dc7443889313acfa12cb83239cdf00f7a0e009.tar.gz
Qt-b5dc7443889313acfa12cb83239cdf00f7a0e009.tar.bz2
Make sure initial state gets set correctly.
Fixes regression introduced by 3ec86e388a35b850573b8fd8b58c93113bb8bd3.
Diffstat (limited to 'src/declarative/util/qmlstategroup.cpp')
-rw-r--r--src/declarative/util/qmlstategroup.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/util/qmlstategroup.cpp b/src/declarative/util/qmlstategroup.cpp
index 4dfa34a..f206f5c 100644
--- a/src/declarative/util/qmlstategroup.cpp
+++ b/src/declarative/util/qmlstategroup.cpp
@@ -331,8 +331,10 @@ void QmlStateGroupPrivate::setCurrentStateInternal(const QString &state,
bool ignoreTrans)
{
Q_Q(QmlStateGroup);
- if (!componentComplete)
+ if (!componentComplete) {
+ currentState = state;
return;
+ }
if (applyingState) {
qWarning() << "Can't apply a state change as part of a state definition.";