summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-01-15 03:33:14 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-01-15 03:33:14 (GMT)
commitd45e7d09675f5dca5d18e2810c8cd8ae6b023279 (patch)
treea80dc2c3b88ba0c2823f582685c2f0f3712c4800 /src/declarative/util
parentc9dcaed1d6eef6a15cc8266cff68636487aa3352 (diff)
downloadQt-d45e7d09675f5dca5d18e2810c8cd8ae6b023279.zip
Qt-d45e7d09675f5dca5d18e2810c8cd8ae6b023279.tar.gz
Qt-d45e7d09675f5dca5d18e2810c8cd8ae6b023279.tar.bz2
Explicit animations in a transition should mark the property as modified.
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qmlanimation.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index 4c5015d..f5333a6 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -1032,15 +1032,26 @@ void QmlPropertyAction::transition(QmlStateActions &actions,
QmlSetPropertyAnimationAction *data = new QmlSetPropertyAnimationAction;
+ bool hasExplicit = false;
if (hasTarget && d->value.isValid()) {
Action myAction;
myAction.property = d->createProperty(target(), d->propertyName, this);
if (myAction.property.isValid()) {
myAction.toValue = d->value;
data->actions << myAction;
+ hasExplicit = true;
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ Action &action = actions[ii];
+ if (action.property.object() == myAction.property.object() &&
+ myAction.property.name() == action.property.name()) {
+ modified << action.property;
+ break; //### any chance there could be multiples?
+ }
+ }
}
}
+ if (!hasExplicit)
for (int ii = 0; ii < actions.count(); ++ii) {
Action &action = actions[ii];
@@ -2219,6 +2230,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions,
data->interpolator = d->interpolator;
data->reverse = direction == Backward ? true : false;
+ bool hasExplicit = false;
//an explicit animation has been specified
if (hasTarget && d->toIsDefined) {
Action myAction;
@@ -2231,9 +2243,19 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions,
d->convertVariant(d->to, d->interpolatorType ? d->interpolatorType : myAction.property.propertyType());
myAction.toValue = d->to;
data->actions << myAction;
+ hasExplicit = true;
+ for (int ii = 0; ii < actions.count(); ++ii) {
+ Action &action = actions[ii];
+ if (action.property.object() == myAction.property.object() &&
+ myAction.property.name() == action.property.name()) {
+ modified << action.property;
+ break; //### any chance there could be multiples?
+ }
+ }
}
}
+ if (!hasExplicit)
for (int ii = 0; ii < actions.count(); ++ii) {
Action &action = actions[ii];