summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlbehavior.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qmlbehavior.cpp')
-rw-r--r--src/declarative/util/qmlbehavior.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/util/qmlbehavior.cpp b/src/declarative/util/qmlbehavior.cpp
index 2367694..d65d8cd 100644
--- a/src/declarative/util/qmlbehavior.cpp
+++ b/src/declarative/util/qmlbehavior.cpp
@@ -124,8 +124,10 @@ void QmlBehavior::setAnimation(QmlAbstractAnimation *animation)
}
d->animation = animation;
- if (d->animation)
- d->animation->setTarget(d->property);
+ if (d->animation) {
+ d->animation->setDefaultTarget(d->property);
+ d->animation->setDisableUserControl();
+ }
}
/*!
@@ -183,7 +185,7 @@ void QmlBehavior::setTarget(const QmlMetaProperty &property)
d->property = property;
d->currentValue = property.read();
if (d->animation)
- d->animation->setTarget(property);
+ d->animation->setDefaultTarget(property);
}
QT_END_NAMESPACE