summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qparallelanimationgroup.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-10-19 00:13:48 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-10-19 00:13:48 (GMT)
commit55bddd50925da27f7a106041db44c15057aac6c1 (patch)
treea5a1ca8f7867b692d0b73e252dd2b9815107425a /src/corelib/animation/qparallelanimationgroup.cpp
parent81093ae5ba8260f5f5b79f317dd461128e76b5fd (diff)
parent1433a2c8682cb1c8f89ceaf97ad7a509ac686879 (diff)
downloadQt-55bddd50925da27f7a106041db44c15057aac6c1.zip
Qt-55bddd50925da27f7a106041db44c15057aac6c1.tar.gz
Qt-55bddd50925da27f7a106041db44c15057aac6c1.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts: configure.exe src/corelib/animation/qabstractanimation.cpp src/s60installs/qt.iby util/qlalr/cppgenerator.cpp
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();