diff options
Diffstat (limited to 'src/quick/util/qquickanimatorjob.cpp')
-rw-r--r-- | src/quick/util/qquickanimatorjob.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index 50fb7090d1..43c8eb302a 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -325,8 +325,10 @@ void QQuickTransformAnimatorJob::preSync() m_helper = nullptr; } - if (!m_target) + if (!m_target) { + invalidate(); return; + } if (!m_helper) { m_helper = qquick_transform_animatorjob_helper_store()->acquire(m_target); @@ -346,27 +348,6 @@ void QQuickTransformAnimatorJob::preSync() m_helper->sync(); } -void QQuickTransformAnimatorJob::postSync() -{ - Q_ASSERT((m_helper != nullptr) == (m_target != nullptr)); // If there is a target, there should also be a helper, ref: preSync - Q_ASSERT(!m_helper || m_helper->item == m_target); // If there is a helper, it should point to our target - - if (!m_target || !m_helper) { - invalidate(); - return; - } - - QQuickItemPrivate *d = QQuickItemPrivate::get(m_target); -#if QT_CONFIG(quick_shadereffect) - if (d->extra.isAllocated() - && d->extra->layer - && d->extra->layer->enabled()) { - d = QQuickItemPrivate::get(d->extra->layer->m_effectSource); - } -#endif - m_helper->node = d->itemNode(); -} - void QQuickTransformAnimatorJob::invalidate() { if (m_helper) |