From b5dc7443889313acfa12cb83239cdf00f7a0e009 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 25 Nov 2009 14:33:05 +1000 Subject: Make sure initial state gets set correctly. Fixes regression introduced by 3ec86e388a35b850573b8fd8b58c93113bb8bd3. --- src/declarative/util/qmlstategroup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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."; -- cgit v0.12