diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 5 | ||||
-rw-r--r-- | src/corelib/animation/qabstractanimation_p.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 7feb3f7..641b42b 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -205,9 +205,10 @@ void QUnifiedTimer::ensureTimerUpdate() void QUnifiedTimer::updateAnimationsTime() { + qint64 totalElapsed = time.elapsed(); // ignore consistentTiming in case the pause timer is active int delta = (consistentTiming && !isPauseTimerActive) ? - timingInterval : time.elapsed() - lastTick; + timingInterval : totalElapsed - lastTick; if (slowMode) { if (slowdownFactor > 0) delta = qRound(delta / slowdownFactor); @@ -215,7 +216,7 @@ void QUnifiedTimer::updateAnimationsTime() delta = 0; } - lastTick = time.elapsed(); + lastTick = totalElapsed; //we make sure we only call update time if the time has actually changed //it might happen in some cases that the time doesn't change because events are delayed diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h index 6ff18f5..d3d4098 100644 --- a/src/corelib/animation/qabstractanimation_p.h +++ b/src/corelib/animation/qabstractanimation_p.h @@ -172,7 +172,7 @@ private: ElapsedTimer time; - int lastTick; + qint64 lastTick; int timingInterval; int currentAnimationIdx; bool consistentTiming; |