summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-04-08 01:31:57 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-04-08 05:06:11 (GMT)
commit74595d1d6156603fc29090a96e0f0d066756bbe6 (patch)
tree8e0a6f7d515d26c2bfdaafa009948d94377ca9ee /src
parent20f614ccfa7657da7e9d585de34c578cef659920 (diff)
downloadQt-74595d1d6156603fc29090a96e0f0d066756bbe6.zip
Qt-74595d1d6156603fc29090a96e0f0d066756bbe6.tar.gz
Qt-74595d1d6156603fc29090a96e0f0d066756bbe6.tar.bz2
Tracking the velocity when restarting SmoothedAnimation
Diffstat (limited to 'src')
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp2
1 files changed, 2 insertions, 0 deletions
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;