diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-05-12 01:51:56 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-05-13 01:00:33 (GMT) |
commit | 2555221bbcb33e0d12e786eb0b3d08bd9260eeb7 (patch) | |
tree | b66311640c0353602160d082e9be6fc12a28ee6e /src/corelib | |
parent | 476414a53a02d99c0887acdb18c96dd65ad9ffa4 (diff) | |
download | Qt-2555221bbcb33e0d12e786eb0b3d08bd9260eeb7.zip Qt-2555221bbcb33e0d12e786eb0b3d08bd9260eeb7.tar.gz Qt-2555221bbcb33e0d12e786eb0b3d08bd9260eeb7.tar.bz2 |
Avoid running animation when loopCount == 0
Task-number: QTBUG-10654
Reviewed-by: Thierry Bastian
Diffstat (limited to 'src/corelib')
-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 01570ad..04342e7 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; |