diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-09-07 03:58:08 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-09-07 03:58:08 (GMT) |
commit | 579e54d588bb435ecead39c38111747e948a7824 (patch) | |
tree | 4f63ee59adb8eb123902a7f5e0574da38a22a178 /src/declarative | |
parent | d77ee9ad223c90cb5c690526632d978c0901d226 (diff) | |
parent | 3113a91f50f12c8ee53f2e84f6b46fde6c2c1693 (diff) | |
download | Qt-579e54d588bb435ecead39c38111747e948a7824.zip Qt-579e54d588bb435ecead39c38111747e948a7824.tar.gz Qt-579e54d588bb435ecead39c38111747e948a7824.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/util/qdeclarativestateoperations.cpp | 17 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativetransitionmanager.cpp | 2 |
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; } |