fix in the fix: use takeAnimation instead of takeAnimationAt
svn path=/trunk/KDE/kdelibs/; revision=1058014
This commit is contained in:
parent
0791fc1ecb
commit
435961b498
@ -125,10 +125,12 @@ void Animation::updateCurrentTime(int currentTime)
|
|||||||
if (d->forwards == QAbstractAnimation::Forward) {
|
if (d->forwards == QAbstractAnimation::Forward) {
|
||||||
if (currentTime == duration()) {
|
if (currentTime == duration()) {
|
||||||
d->dirtyFlag = false;
|
d->dirtyFlag = false;
|
||||||
|
emit finished();
|
||||||
}
|
}
|
||||||
} else if (d->forwards == QAbstractAnimation::Backward) {
|
} else if (d->forwards == QAbstractAnimation::Backward) {
|
||||||
if (currentTime == 0) {
|
if (currentTime == 0) {
|
||||||
d->dirtyFlag = false;
|
d->dirtyFlag = false;
|
||||||
|
emit finished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ AnimationGroup::AnimationGroup(QObject* parent)
|
|||||||
d(new AnimationGroupPrivate)
|
d(new AnimationGroupPrivate)
|
||||||
{
|
{
|
||||||
d->anim = new QSequentialAnimationGroup(this);
|
d->anim = new QSequentialAnimationGroup(this);
|
||||||
|
connect(d->anim, SIGNAL(finished()), this, SIGNAL(finished()));
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationGroup::~AnimationGroup()
|
AnimationGroup::~AnimationGroup()
|
||||||
@ -75,11 +76,13 @@ void AnimationGroup::setParallel(bool parallel)
|
|||||||
newGroup = new QSequentialAnimationGroup(this);
|
newGroup = new QSequentialAnimationGroup(this);
|
||||||
|
|
||||||
while (d->anim->animationCount()) {
|
while (d->anim->animationCount()) {
|
||||||
newGroup->addAnimation(d->anim->takeAnimationAt(0));
|
newGroup->addAnimation(d->anim->takeAnimation(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disconnect(d->anim, SIGNAL(finished()), this, SIGNAL(finished()));
|
||||||
delete d->anim;
|
delete d->anim;
|
||||||
d->anim = newGroup;
|
d->anim = newGroup;
|
||||||
|
connect(d->anim, SIGNAL(finished()), this, SIGNAL(finished()));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnimationGroup::isParallel() const
|
bool AnimationGroup::isParallel() const
|
||||||
@ -138,10 +141,12 @@ void AnimationGroup::updateCurrentTime(int currentTime)
|
|||||||
if (d->forwards == QAbstractAnimation::Forward) {
|
if (d->forwards == QAbstractAnimation::Forward) {
|
||||||
if (currentTime == duration()) {
|
if (currentTime == duration()) {
|
||||||
d->dirtyFlag = false;
|
d->dirtyFlag = false;
|
||||||
|
emit finished();
|
||||||
}
|
}
|
||||||
} else if (d->forwards == QAbstractAnimation::Backward) {
|
} else if (d->forwards == QAbstractAnimation::Backward) {
|
||||||
if (currentTime == 0) {
|
if (currentTime == 0) {
|
||||||
d->dirtyFlag = false;
|
d->dirtyFlag = false;
|
||||||
|
emit finished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user