diff options
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 6489cdc..b585fe3 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -194,12 +194,6 @@ QUnifiedTimer *QUnifiedTimer::instance() void QUnifiedTimer::timerEvent(QTimerEvent *event) { - //this is simply the time we last received a tick - const int oldLastTick = lastTick; - if (time.isValid()) - lastTick = consistentTiming ? oldLastTick + timingInterval : time.elapsed(); - - if (event->timerId() == startStopAnimationTimer.timerId()) { startStopAnimationTimer.stop(); //we transfer the waiting animations into the "really running" state @@ -214,6 +208,10 @@ void QUnifiedTimer::timerEvent(QTimerEvent *event) time.start(); } } else if (event->timerId() == animationTimer.timerId()) { + //this is simply the time we last received a tick + const int oldLastTick = lastTick; + lastTick = consistentTiming ? oldLastTick + timingInterval : time.elapsed(); + //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 //when the CPU load is high |