From 1bc1994dfe6bec8439f6c52fb2a9f2d0ddc9234f Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Tue, 14 May 2019 00:06:22 +0200 Subject: [PATCH] FrameSvgItem: emit maskChanged also from geometryChanged() Summary: Needed e.g. to fix the missing update of the mask on changing the size of the Plasma panel if only listening to mask changes. Reviewers: #plasma, apol Reviewed By: apol Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D21201 --- src/declarativeimports/core/framesvgitem.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/core/framesvgitem.cpp b/src/declarativeimports/core/framesvgitem.cpp index 5f1e60f55..48496fa66 100644 --- a/src/declarativeimports/core/framesvgitem.cpp +++ b/src/declarativeimports/core/framesvgitem.cpp @@ -464,11 +464,19 @@ QRegion FrameSvgItem::mask() const void FrameSvgItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { - if (isComponentComplete()) { + const bool isComponentComplete = this->isComponentComplete(); + if (isComponentComplete) { m_frameSvg->resizeFrame(newGeometry.size()); m_sizeChanged = true; } + QQuickItem::geometryChanged(newGeometry, oldGeometry); + + // the above only triggers updatePaintNode, so we have to inform subscribers + // about the potential change of the mask explicitly here + if (isComponentComplete) { + emit maskChanged(); + } } void FrameSvgItem::doUpdate()