diff options
author | mae <qt-info@nokia.com> | 2010-07-08 12:54:00 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-07-18 04:23:43 (GMT) |
commit | 55ef2c487358c85a87e5cd63e87e2c019c3f5935 (patch) | |
tree | 1bd27a6d2a4e26eb14846970eb49690f71be8727 | |
parent | 953eeb0eeebb27d440e002cf4c3620b87bbe43d5 (diff) | |
download | Qt-55ef2c487358c85a87e5cd63e87e2c019c3f5935.zip Qt-55ef2c487358c85a87e5cd63e87e2c019c3f5935.tar.gz Qt-55ef2c487358c85a87e5cd63e87e2c019c3f5935.tar.bz2 |
Fix spring animation
Do not stop a spring animation if the to value got
changed while notifying the target property change.
(cherry picked from commit 3f2a4f34f6206e3a94915a8d50ddfe81e047b88b)
-rw-r--r-- | src/declarative/util/qdeclarativespringanimation.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp index d7c0f90..58d81ad 100644 --- a/src/declarative/util/qdeclarativespringanimation.cpp +++ b/src/declarative/util/qdeclarativespringanimation.cpp @@ -183,11 +183,13 @@ void QDeclarativeSpringAnimationPrivate::tick(int time) lastTime = time; } + qreal old_to = to; + QDeclarativePropertyPrivate::write(defaultProperty, currentValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); - if (stop) + if (stop && old_to == to) // do not stop if we got restarted clock.stop(); } |