diff options
author | mae <qt-info@nokia.com> | 2010-07-08 12:54:00 (GMT) |
---|---|---|
committer | mae <qt-info@nokia.com> | 2010-07-08 15:49:59 (GMT) |
commit | 3f2a4f34f6206e3a94915a8d50ddfe81e047b88b (patch) | |
tree | cd793e2ec909b528902a920d39634563e2e02002 | |
parent | 4123287497f38856a71d206f5e10193a5df77ca2 (diff) | |
download | Qt-3f2a4f34f6206e3a94915a8d50ddfe81e047b88b.zip Qt-3f2a4f34f6206e3a94915a8d50ddfe81e047b88b.tar.gz Qt-3f2a4f34f6206e3a94915a8d50ddfe81e047b88b.tar.bz2 |
Fix spring animation
Do not stop a spring animation if the to value got
changed while notifying the target property change.
-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 314b82b..d3eb0c5 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(); } |