From 3f2a4f34f6206e3a94915a8d50ddfe81e047b88b Mon Sep 17 00:00:00 2001 From: mae Date: Thu, 8 Jul 2010 14:54:00 +0200 Subject: Fix spring animation Do not stop a spring animation if the to value got changed while notifying the target property change. --- src/declarative/util/qdeclarativespringanimation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); } -- cgit v0.12