diff options
author | Wang Chuan <ouchuanm@outlook.com> | 2020-04-02 22:24:22 +0800 |
---|---|---|
committer | Wang Chuan <ouchuanm@outlook.com> | 2020-04-07 21:53:12 +0800 |
commit | 2cefb096768b1d8d30b4d0705a622f1c7d041344 (patch) | |
tree | 70de419292e2591729f98fc7e52ab912bd80d248 /src/quick/util | |
parent | 5050ebd7a5c9d181af8bc037aaed05ff3f9b0ca6 (diff) |
OpacityAnimator: apply opacity animation to the first frame in SG
When using OpacityAnimator, an opacity node will be created and inserted into
nodes tree to perform opacity animation. However, since the default value of
opacity node is 1, the opacity animation will start from 1 even if we set
it from 0 to 1.
Fixes this issue by updating the value of opacity just after creating a new
opacity node.
Fixes: QTBUG-79199
Change-Id: I2e462f0c56892fda040836ffde6685145769e60c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/util')
-rw-r--r-- | src/quick/util/qquickanimatorjob.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index a9caedec4f..84480ddd18 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -582,6 +582,7 @@ void QQuickOpacityAnimatorJob::postSync() } d->extra.value().opacityNode = m_opacityNode; + updateCurrentTime(0); } Q_ASSERT(m_opacityNode); } |