Fix repaint scheduling in Item::setVisible()

If an item disappears, we need a workspace repaint.
This commit is contained in:
Vlad Zahorodnii 2022-04-27 13:52:30 +03:00
parent 30076f297c
commit 94d30c2268

View file

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