summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp17
-rw-r--r--src/declarative/util/qdeclarativetransitionmanager.cpp2
2 files changed, 3 insertions, 16 deletions
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 6e6f0cb..845b3da 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -1427,6 +1427,7 @@ void QDeclarativeAnchorChanges::clearBindings()
if (!d->target)
return;
+ //### should this (saving "from" values) be moved to saveCurrentValues()?
d->fromX = d->target->x();
d->fromY = d->target->y();
d->fromWidth = d->target->width();
@@ -1486,22 +1487,8 @@ void QDeclarativeAnchorChanges::rewind()
return;
QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target);
- //restore previous anchors
- if (d->rewindLeft.anchorLine != QDeclarativeAnchorLine::Invalid)
- targetPrivate->anchors()->setLeft(d->rewindLeft);
- if (d->rewindRight.anchorLine != QDeclarativeAnchorLine::Invalid)
- targetPrivate->anchors()->setRight(d->rewindRight);
- if (d->rewindHCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
- targetPrivate->anchors()->setHorizontalCenter(d->rewindHCenter);
- if (d->rewindTop.anchorLine != QDeclarativeAnchorLine::Invalid)
- targetPrivate->anchors()->setTop(d->rewindTop);
- if (d->rewindBottom.anchorLine != QDeclarativeAnchorLine::Invalid)
- targetPrivate->anchors()->setBottom(d->rewindBottom);
- if (d->rewindVCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
- targetPrivate->anchors()->setVerticalCenter(d->rewindVCenter);
- if (d->rewindBaseline.anchorLine != QDeclarativeAnchorLine::Invalid)
- targetPrivate->anchors()->setBaseline(d->rewindBaseline);
+ //restore previous values (but not previous bindings, i.e. anchors)
d->target->setX(d->rewindX);
d->target->setY(d->rewindY);
if (targetPrivate->widthValid) {
diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp
index 9f198e4..d82c4bb 100644
--- a/src/declarative/util/qdeclarativetransitionmanager.cpp
+++ b/src/declarative/util/qdeclarativetransitionmanager.cpp
@@ -176,7 +176,7 @@ void QDeclarativeTransitionManager::transition(const QList<QDeclarativeAction> &
if (action.event->isReversable()) {
action.event->clearBindings();
action.event->rewind();
- action.event->clearBindings();
+ action.event->clearBindings(); //### shouldn't be needed
}
continue;
}