summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-12-12 14:51:15 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-13 02:24:03 +0100
commit5d00ae3b698653f3ae83ccb353120cc36a3b3518 (patch)
tree554d497be28a3526ab5163a94fe1eda52d717d59 /src/corelib/animation
parent30a4d9bc99caae9e7254da18c95b5422e6917688 (diff)
Stop animation driver in the appropriate place.
Calling stop from restartAnimationTimer was incorrect (it was initially added as a fix after the introduction of QAnimationDriver, but this is a better location for the fix). Change-Id: I2507096b846ada061e36a9ece6aa814d801ddd53 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 11113138a7..71eb9c9f9c 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -269,8 +269,7 @@ void QUnifiedTimer::restartAnimationTimer()
if (pauseTimer.isActive())
pauseTimer.stop();
driver->start();
- } else if (runningLeafAnimations == 0)
- driver->stop();
+ }
}
void QUnifiedTimer::setTimingInterval(int interval)
@@ -303,6 +302,7 @@ void QUnifiedTimer::stopTimer()
{
stopTimerPending = false;
if (animations.isEmpty()) {
+ driver->stop();
pauseTimer.stop();
// invalidate the start reference time
time.invalidate();