summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativestateoperations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qdeclarativestateoperations.cpp')
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp17
1 files changed, 2 insertions, 15 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) {