From 94d30c22689d1249b9ce0590623946d7f9d4376f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 27 Apr 2022 13:52:30 +0300 Subject: [PATCH] Fix repaint scheduling in Item::setVisible() If an item disappears, we need a workspace repaint. --- src/item.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/item.cpp b/src/item.cpp index 55ce346c40..bb125a07b0 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -352,7 +352,11 @@ void Item::updateEffectiveVisibility() } m_effectiveVisible = effectiveVisible; - scheduleRepaintInternal(boundingRect()); + if (!m_effectiveVisible) { + Compositor::self()->scene()->addRepaint(mapToGlobal(boundingRect())); + } else { + scheduleRepaintInternal(boundingRect()); + } for (Item *childItem : qAsConst(m_childItems)) { childItem->updateEffectiveVisibility();