scene: Invalidate parent's sorted child item list in Item::stack{Before,After}

We update the parent's child list, so its sorted child list must be
invalidated.


(cherry picked from commit 32d7d8a1ea)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 68f138e4a5
commit 0272c841c4
  1. 4
      src/scene/item.cpp

@ -314,7 +314,7 @@ void Item::stackBefore(Item *sibling)
}
m_parentItem->m_childItems.move(selfIndex, selfIndex > siblingIndex ? siblingIndex : siblingIndex - 1);
markSortedChildItemsDirty();
m_parentItem->markSortedChildItemsDirty();
scheduleRepaint(boundingRect());
sibling->scheduleRepaint(sibling->boundingRect());
@ -342,7 +342,7 @@ void Item::stackAfter(Item *sibling)
}
m_parentItem->m_childItems.move(selfIndex, selfIndex > siblingIndex ? siblingIndex + 1 : siblingIndex);
markSortedChildItemsDirty();
m_parentItem->markSortedChildItemsDirty();
scheduleRepaint(boundingRect());
sibling->scheduleRepaint(sibling->boundingRect());

Loading…
Cancel
Save