diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-10-09 04:29:10 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-10-09 04:29:10 (GMT) |
commit | 9b7d77460c38ec93d98fa4779826b32bea2eaaff (patch) | |
tree | df741aad025f325e0f15330887bcd82b0226b366 /src/corelib | |
parent | 04511e3dbbcdf40489852babbf4753e0f744c26f (diff) | |
parent | 3a0cb6ebef245780782fcab6709e471d26789590 (diff) | |
download | Qt-9b7d77460c38ec93d98fa4779826b32bea2eaaff.zip Qt-9b7d77460c38ec93d98fa4779826b32bea2eaaff.tar.gz Qt-9b7d77460c38ec93d98fa4779826b32bea2eaaff.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 2769040..a8c3504 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -231,7 +231,8 @@ void QUnifiedTimer::registerAnimation(QAbstractAnimation *animation) Q_ASSERT(!QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer); QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = true; animationsToStart << animation; - startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); + if (!startStopAnimationTimer.isActive()) + startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); } void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation) @@ -245,11 +246,12 @@ void QUnifiedTimer::unregisterAnimation(QAbstractAnimation *animation) // this is needed if we unregister an animation while its running if (idx <= currentAnimationIdx) --currentAnimationIdx; - if (animations.isEmpty()) + if (animations.isEmpty() && !startStopAnimationTimer.isActive()) startStopAnimationTimer.start(STARTSTOP_TIMER_DELAY, this); } else { animationsToStart.removeOne(animation); } + QAbstractAnimationPrivate::get(animation)->hasRegisteredTimer = false; } |