summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-09-07 16:36:49 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-09-07 16:36:49 (GMT)
commit415ad7b69d364c41156d35b98790b02667a6671b (patch)
tree759b02134da808773a1d68eecf2eb5c0ff12167c /src/declarative/util
parent3c18c2a43260a271f8a13e89053eede15d399005 (diff)
parent703d85e8991e2061062f6d7c695cdeb45d9661fd (diff)
downloadQt-415ad7b69d364c41156d35b98790b02667a6671b.zip
Qt-415ad7b69d364c41156d35b98790b02667a6671b.tar.gz
Qt-415ad7b69d364c41156d35b98790b02667a6671b.tar.bz2
Merge branch '4.7' into qmldocs
Diffstat (limited to 'src/declarative/util')
-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;
}