summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-04-28 13:52:28 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-04-28 13:57:15 (GMT)
commit1cb0906f04ed49de26575252740b8bb5190e3025 (patch)
tree53dc406b08c7a0a3c9c2491c534d4aca7a71697c /src/declarative
parent6ad616206fe3e3a2f8560599e7dcd44724bab6b7 (diff)
downloadQt-1cb0906f04ed49de26575252740b8bb5190e3025.zip
Qt-1cb0906f04ed49de26575252740b8bb5190e3025.tar.gz
Qt-1cb0906f04ed49de26575252740b8bb5190e3025.tar.bz2
Fix qmlvariantanimation to behave as qmlnumericanimation when 'from' is not set
The qmlvariantanimation was setting an invalid 'fromValue' when the 'from' property was unspecified.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/util/qmlanimation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index f97b662..b5826fa 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -2213,8 +2213,11 @@ void QmlVariantAnimation::transition(QmlStateActions &actions,
objs.insert(obj);
Action myAction = action;
- if (d->from.isValid())
+ if (d->from.isValid()) {
myAction.fromValue = QVariant(d->from);
+ } else {
+ myAction.fromValue = QVariant();
+ }
if (d->to.isValid())
myAction.toValue = QVariant(d->to);