diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-04-22 16:24:06 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-24 13:46:52 +0200 |
commit | be49c10b77ff997a7f1395d9e4e80eab02a2b387 (patch) | |
tree | 381c8ad090a0d45ab4584ae131112dd5f22b2555 /src/qml/animations/qparallelanimationgroupjob.cpp | |
parent | 2d8cde43e8ead44fb8bae7078741ca2fe6266733 (diff) |
Reset loop counters when animations are started.
Where normal animations would derive the current loop from the current
time, uncontrolled animations use an iterative approach and which was
not reset when an animation was restarted or a parent had a loop
around it.
Change-Id: Ia7a1880c8b7578463dff4c5ddeab48324bcb32ee
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/qml/animations/qparallelanimationgroupjob.cpp')
-rw-r--r-- | src/qml/animations/qparallelanimationgroupjob.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/animations/qparallelanimationgroupjob.cpp b/src/qml/animations/qparallelanimationgroupjob.cpp index f66d4b1826..f3ea389469 100644 --- a/src/qml/animations/qparallelanimationgroupjob.cpp +++ b/src/qml/animations/qparallelanimationgroupjob.cpp @@ -142,8 +142,10 @@ void QParallelAnimationGroupJob::updateState(QAbstractAnimationJob::State newSta break; case Running: for (QAbstractAnimationJob *animation = firstChild(); animation; animation = animation->nextSibling()) { - if (oldState == Stopped) + if (oldState == Stopped) { animation->stop(); + m_previousLoop = m_direction == Forward ? 0 : m_loopCount - 1; + } resetUncontrolledAnimationFinishTime(animation); animation->setDirection(m_direction); if (shouldAnimationStart(animation, oldState == Stopped)) |