diff options
-rw-r--r-- | src/declarative/util/qdeclarativeanimation.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 195939f..0f7c946 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -2535,15 +2535,14 @@ void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions, myAction.event = vpc; viaData->pc << vpc; viaData->actions << myAction; - int index = i; - bool invertedIndex = (direction == QDeclarativeAbstractAnimation::Forward) && action.reverseEvent; QDeclarativeAction dummyAction; - QDeclarativeAction &xAction = pc->xIsSet() ? actions[invertedIndex ? --index : ++i] : dummyAction; - QDeclarativeAction &yAction = pc->yIsSet() ? actions[invertedIndex ? --index : ++i] : dummyAction; - QDeclarativeAction &sAction = pc->scaleIsSet() ? actions[invertedIndex ? --index : ++i] : dummyAction; - QDeclarativeAction &rAction = pc->rotationIsSet() ? actions[invertedIndex ? --index : ++i] : dummyAction; + QDeclarativeAction &xAction = pc->xIsSet() ? actions[++i] : dummyAction; + QDeclarativeAction &yAction = pc->yIsSet() ? actions[++i] : dummyAction; + QDeclarativeAction &sAction = pc->scaleIsSet() ? actions[++i] : dummyAction; + QDeclarativeAction &rAction = pc->rotationIsSet() ? actions[++i] : dummyAction; + bool forward = (direction == QDeclarativeAbstractAnimation::Forward); QDeclarativeItem *target = pc->object(); - QDeclarativeItem *targetParent = action.reverseEvent ? pc->originalParent() : pc->parent(); + QDeclarativeItem *targetParent = forward ? pc->parent() : pc->originalParent(); //### this mirrors the logic in QDeclarativeParentChange. bool ok; @@ -2585,9 +2584,9 @@ void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions, qreal w = target->width(); qreal h = target->height(); if (pc->widthIsSet()) - w = actions[invertedIndex ? --index : ++i].toValue.toReal(); + w = actions[++i].toValue.toReal(); if (pc->heightIsSet()) - h = actions[invertedIndex ? --index : ++i].toValue.toReal(); + h = actions[++i].toValue.toReal(); const QPointF &transformOrigin = d->computeTransformOrigin(target->transformOrigin(), w,h); qreal tempxt = transformOrigin.x(); |