diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-05-12 11:51:56 +1000 |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-05-13 11:00:33 +1000 |
commit | 2555221bbcb33e0d12e786eb0b3d08bd9260eeb7 (patch) | |
tree | b66311640c0353602160d082e9be6fc12a28ee6e /src/corelib/animation | |
parent | 476414a53a02d99c0887acdb18c96dd65ad9ffa4 (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.cpp | 3 |
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; |