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
This commit is contained in:
Friedrich W. H. Kossebau 2019-05-14 00:06:22 +02:00
parent 193775def6
commit 1bc1994dfe

View File

@ -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()