diff options
author | Thomas Senyk <thomas.senyk@qt.io> | 2022-12-14 16:39:11 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-01-13 09:03:32 +0000 |
commit | c0bc883d1134d47ad0b031a2ac5af1b4ece0cf77 (patch) | |
tree | 85fdbe98a35fada2f27679825ac8e7417a15e0cb /src | |
parent | 18e9d3df8a6ef3a5022472e57727c79ee26beeaa (diff) |
Fix Animators in case of node recreate
Those node recreations happen when the RHI backend is recreated.
One such case is GLX_NV_robustness_video_memory_purge
In such cases QQuickTransformAnimatorJob::invalidate()
will be called, however the node will never be re-set
Change-Id: I3136c220f41781689f4a271caf0543a3b659447c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 0359381bc78fb69999d3c687d617858f9666c0aa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/util/qquickanimatorjob.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index a777f552e7..19d28b8248 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -394,11 +394,12 @@ void QQuickTransformAnimatorJob::Helper::sync() wasSynced = true; } + // We update the node before checking on dirty, as the node might have changed without the animator running + node = d->itemNode(); + if (dirty == 0) return; - node = d->itemNode(); - if (dirty & QQuickItemPrivate::Position) { dx = item->x(); dy = item->y(); |