Append the start time of the current loop to the animation time.
authorGunnar Sletta <gunnar.sletta@jollamobile.com>
Tue, 22 Apr 2014 15:56:03 +0000 (17:56 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 24 Apr 2014 11:46:52 +0000 (13:46 +0200)
currentTime() uses the total time, so when we use only the loop-local
time for the child animations, normal animations will seem to have
terminated long ago (on the previous loop).

Change-Id: I80a229f40a99569014d8082d153ad579c09fb9db
Reviewed-by: Michael Brasser <michael.brasser@live.com>
src/qml/animations/qparallelanimationgroupjob.cpp

index f3ea389..818988b 100644 (file)
@@ -230,7 +230,7 @@ void QParallelAnimationGroupJob::uncontrolledAnimationFinished(QAbstractAnimatio
         maxDuration = qMax(maxDuration, job->totalDuration());
     }
 
-    setUncontrolledAnimationFinishTime(this, qMax(maxDuration, currentTime()));
+    setUncontrolledAnimationFinishTime(this, qMax(maxDuration + m_currentLoopStartTime, currentTime()));
 
     if (!running
             && ((m_direction == Forward && m_currentLoop == m_loopCount -1)