diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-02-18 16:19:23 +1000 |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2011-03-16 13:03:02 +1000 |
commit | b3f605aebb90dc651e73a252788a81cb530a74b9 (patch) | |
tree | aeeff40a5c0beb83e89c3df55fce23a9815b1b61 /src/corelib/animation/qabstractanimation.cpp | |
parent | 99512251be8e5814238ec398854a8aa71fa8b25d (diff) | |
download | qt4-tools-b3f605aebb90dc651e73a252788a81cb530a74b9.tar.gz |
Stop the animation driver when there are no more animations.
Change-Id: If03c9e4539e984db725f7e7d89e8b565890fcbed
Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/corelib/animation/qabstractanimation.cpp')
-rw-r--r-- | src/corelib/animation/qabstractanimation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 2d5cfabe2f..a562542b52 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -254,7 +254,8 @@ void QUnifiedTimer::restartAnimationTimer() } else if (!driver->isRunning() || isPauseTimerActive) { driver->start(); isPauseTimerActive = false; - } + } else if (runningLeafAnimations == 0) + driver->stop(); } void QUnifiedTimer::setTimingInterval(int interval) |