diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-05-07 07:17:37 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-05-07 10:41:11 (GMT) |
commit | 1e404bcb6df5127a1d0e24ed11cce1c0260a57e9 (patch) | |
tree | a24b91f6541f6cab3f0f44515201c54cda53a7b4 /src | |
parent | 2edb7ce649bba7221f02aeae021645e219e25f70 (diff) | |
download | Qt-1e404bcb6df5127a1d0e24ed11cce1c0260a57e9.zip Qt-1e404bcb6df5127a1d0e24ed11cce1c0260a57e9.tar.gz Qt-1e404bcb6df5127a1d0e24ed11cce1c0260a57e9.tar.bz2 |
store top-level animation in dedicated variable
The animation itself is used by subsequent code, so we mustn't change it.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 7f2132d..4533115 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -713,9 +713,10 @@ void QStateMachinePrivate::applyProperties(const QList<QAbstractTransition*> &tr // Stop the (top-level) animation. // ### Stopping nested animation has weird behavior. - while (QAnimationGroup *group = anim->group()) - anim = group; - anim->stop(); + QAbstractAnimation *topLevelAnim = anim; + while (QAnimationGroup *group = topLevelAnim->group()) + topLevelAnim = group; + topLevelAnim->stop(); if (resetAnimationEndValues.contains(anim)) { qobject_cast<QVariantAnimation*>(anim)->setEndValue(QVariant()); // ### generalize |