summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qparallelanimationgroup.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-10-19 04:58:20 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-10-19 04:58:20 (GMT)
commit91e133d9eeba0b7ea87a3ddb3f10d2a2b345473d (patch)
tree499f3a3e0ba67c76da18a33fd331569670578a79 /src/corelib/animation/qparallelanimationgroup.cpp
parent4a0e3170c779a6a37954c3dfcfd0b9f0ce144701 (diff)
parentc3bab81d5966c9bd3a42d9c5cbb9d8ad35a1b330 (diff)
downloadQt-91e133d9eeba0b7ea87a3ddb3f10d2a2b345473d.zip
Qt-91e133d9eeba0b7ea87a3ddb3f10d2a2b345473d.tar.gz
Qt-91e133d9eeba0b7ea87a3ddb3f10d2a2b345473d.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/corelib/animation/qparallelanimationgroup.cpp')
-rw-r--r--src/corelib/animation/qparallelanimationgroup.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp
index 2812854..0a04c14 100644
--- a/src/corelib/animation/qparallelanimationgroup.cpp
+++ b/src/corelib/animation/qparallelanimationgroup.cpp
@@ -136,7 +136,9 @@ void QParallelAnimationGroup::updateCurrentTime(int currentTime)
int dura = duration();
if (dura > 0) {
for (int i = 0; i < d->animations.size(); ++i) {
- d->animations.at(i)->setCurrentTime(dura); // will stop
+ QAbstractAnimation *animation = d->animations.at(i);
+ if (animation->state() != QAbstractAnimation::Stopped)
+ d->animations.at(i)->setCurrentTime(dura); // will stop
}
}
} else if (d->currentLoop < d->lastLoop) {
@@ -160,7 +162,7 @@ void QParallelAnimationGroup::updateCurrentTime(int currentTime)
QAbstractAnimation *animation = d->animations.at(i);
const int dura = animation->totalDuration();
//if the loopcount is bigger we should always start all animations
- if (d->currentLoop > d->lastLoop
+ if (d->currentLoop > d->lastLoop
//if we're at the end of the animation, we need to start it if it wasn't already started in this loop
//this happens in Backward direction where not all animations are started at the same time
|| d->shouldAnimationStart(animation, d->lastCurrentTime > dura /*startIfAtEnd*/)) {
@@ -283,7 +285,7 @@ bool QParallelAnimationGroupPrivate::shouldAnimationStart(QAbstractAnimation *an
void QParallelAnimationGroupPrivate::applyGroupState(QAbstractAnimation *animation)
{
- switch (state)
+ switch (state)
{
case QAbstractAnimation::Running:
animation->start();