summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qabstractanimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/animation/qabstractanimation.cpp')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 2d5cfab..f20bbf4 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -206,6 +206,10 @@ void QUnifiedTimer::ensureTimerUpdate()
void QUnifiedTimer::updateAnimationsTime()
{
+ //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations
+ if(insideTick)
+ return;
+
qint64 totalElapsed = time.elapsed();
// ignore consistentTiming in case the pause timer is active
int delta = (consistentTiming && !isPauseTimerActive) ?
@@ -223,12 +227,14 @@ void QUnifiedTimer::updateAnimationsTime()
//it might happen in some cases that the time doesn't change because events are delayed
//when the CPU load is high
if (delta) {
+ insideTick = true;
for (currentAnimationIdx = 0; currentAnimationIdx < animations.count(); ++currentAnimationIdx) {
QAbstractAnimation *animation = animations.at(currentAnimationIdx);
int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime
+ (animation->direction() == QAbstractAnimation::Forward ? delta : -delta);
animation->setCurrentTime(elapsed);
}
+ insideTick = false;
currentAnimationIdx = 0;
}
}