summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qvariantanimation.cpp
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-05-15 10:40:00 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-05-15 11:59:59 (GMT)
commit4f07fd724a7cc763d57f4b2e23d407b820bb8880 (patch)
tree5378ab131f7438104058a92a97826b683111645b /src/corelib/animation/qvariantanimation.cpp
parent9227f6249de0e60a2a428549848c875c01dbf4d2 (diff)
downloadQt-4f07fd724a7cc763d57f4b2e23d407b820bb8880.zip
Qt-4f07fd724a7cc763d57f4b2e23d407b820bb8880.tar.gz
Qt-4f07fd724a7cc763d57f4b2e23d407b820bb8880.tar.bz2
Update current value on QVariantAnimation::setKeyValues
The current value was udpated on setKeyValueAt, but not on setKeyValues and this was leading to a semantic inconsistency. Reviewed-by: janarve
Diffstat (limited to 'src/corelib/animation/qvariantanimation.cpp')
-rw-r--r--src/corelib/animation/qvariantanimation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index fbce917..cad9341 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -550,6 +550,7 @@ void QVariantAnimation::setKeyValues(const KeyValues &keyValues)
d->keyValues = keyValues;
qSort(d->keyValues.begin(), d->keyValues.end(), animationValueLessThan);
d->currentInterval.start.first = 2; // this will force the refresh
+ d->updateCurrentValue();
d->hasStartValue = !d->keyValues.isEmpty() && d->keyValues.at(0).first == 0;
}