From d7acc24093ce70cd970b7d3bb830d766da051e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= Date: Wed, 30 Oct 2024 16:55:59 +0100 Subject: [PATCH] Update ExpoCell contentItem position upon its parent change Since the position of the contentItem depends on the position and scale of the parent item, make sure to re-evaluate it when the parent changes. BUG:495501 --- src/plugins/private/expolayout.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/private/expolayout.cpp b/src/plugins/private/expolayout.cpp index 0d008c8bab..52e8bd6616 100644 --- a/src/plugins/private/expolayout.cpp +++ b/src/plugins/private/expolayout.cpp @@ -100,8 +100,14 @@ void ExpoCell::setContentItem(QQuickItem *item) return; } + if (m_contentItem) { + disconnect(m_contentItem, &QQuickItem::parentChanged, this, &ExpoCell::updateContentItemGeometry); + } + m_contentItem = item; + connect(m_contentItem, &QQuickItem::parentChanged, this, &ExpoCell::updateContentItemGeometry); + if (m_contentItem) { m_contentItem->setVisible(isVisible()); }