From 5d00ae3b698653f3ae83ccb353120cc36a3b3518 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 12 Dec 2011 14:51:15 +1000 Subject: 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 --- src/corelib/animation/qabstractanimation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/animation') 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(); -- cgit v1.2.3