From 74595d1d6156603fc29090a96e0f0d066756bbe6 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Thu, 8 Apr 2010 11:31:57 +1000 Subject: Tracking the velocity when restarting SmoothedAnimation --- src/declarative/util/qdeclarativesmoothedanimation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index f21b0c7..48a7583 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -69,6 +69,7 @@ QSmoothedAnimation::QSmoothedAnimation(QObject *parent) void QSmoothedAnimation::restart() { + initialVelocity = trackVelocity; if (state() != QAbstractAnimation::Running) start(); else @@ -224,6 +225,7 @@ void QSmoothedAnimation::init() QDeclarativePropertyPrivate::write(target, to, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + stop(); return; case QDeclarativeSmoothedAnimation::Immediate: initialVelocity = 0; -- cgit v0.12