summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlstate.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-11-17 04:30:59 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-11-17 04:42:27 (GMT)
commita2511fc8cc122412ddf3955aec73a6b42c601d92 (patch)
tree85d7242e8147f2c4780c7461308f0388ca8e2538 /src/declarative/util/qmlstate.cpp
parent119a52991cf33b6738bdaf8296a06b33341228a0 (diff)
downloadQt-a2511fc8cc122412ddf3955aec73a6b42c601d92.zip
Qt-a2511fc8cc122412ddf3955aec73a6b42c601d92.tar.gz
Qt-a2511fc8cc122412ddf3955aec73a6b42c601d92.tar.bz2
Distinguish between reversing and rewinding a state change.
Task-number: QTBUG-5769
Diffstat (limited to 'src/declarative/util/qmlstate.cpp')
-rw-r--r--src/declarative/util/qmlstate.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp
index 1f5dbad..c05c539 100644
--- a/src/declarative/util/qmlstate.cpp
+++ b/src/declarative/util/qmlstate.cpp
@@ -362,6 +362,8 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever
}
if (!found || action.event != d->revertList.at(jj).event)
action.event->saveOriginals();
+ else if (action.event->isRewindable())
+ action.event->saveCurrentValues();
} else {
action.fromBinding = action.property.binding();
@@ -422,6 +424,8 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever
a.specifiedProperty = d->revertList.at(ii).specifiedProperty;
a.event = d->revertList.at(ii).event;
a.reverseEvent = d->revertList.at(ii).reverseEvent;
+ if (a.event && a.event->isRewindable())
+ a.event->saveCurrentValues();
applyList << a;
// Store these special reverts in the reverting list
d->reverting << d->revertList.at(ii).property;