aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/animations
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/animations')
-rw-r--r--src/qml/animations/qabstractanimationjob.cpp1
-rw-r--r--src/qml/animations/qparallelanimationgroupjob.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/animations/qabstractanimationjob.cpp b/src/qml/animations/qabstractanimationjob.cpp
index 0928c0efc1..991b1fad5c 100644
--- a/src/qml/animations/qabstractanimationjob.cpp
+++ b/src/qml/animations/qabstractanimationjob.cpp
@@ -380,6 +380,7 @@ void QAbstractAnimationJob::setState(QAbstractAnimationJob::State newState)
{
// this ensures that the value is updated now that the animation is running
if (oldState == Stopped) {
+ m_currentLoop = 0;
if (isTopLevel) {
// currentTime needs to be updated if pauseTimer is active
RETURN_IF_DELETED(QQmlAnimationTimer::ensureTimerUpdate());
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))