summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-05-12 11:51:56 +1000
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-05-13 11:00:33 +1000
commit2555221bbcb33e0d12e786eb0b3d08bd9260eeb7 (patch)
treeb66311640c0353602160d082e9be6fc12a28ee6e /src/corelib/animation
parent476414a53a02d99c0887acdb18c96dd65ad9ffa4 (diff)
Avoid running animation when loopCount == 0
Task-number: QTBUG-10654 Reviewed-by: Thierry Bastian
Diffstat (limited to 'src/corelib/animation')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 01570ade81..04342e72f0 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -369,6 +369,9 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
if (state == newState)
return;
+ if (loopCount == 0)
+ return;
+
QAbstractAnimation::State oldState = state;
int oldCurrentTime = currentTime;
int oldCurrentLoop = currentLoop;