From 71e1e395df703ba933e9e6676f905571a789ac02 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Mon, 17 Aug 2026 18:45:56 +0200 Subject: [PATCH] Clear widget cache for active macro to enable undo / redo --- lib/macro/macro-segment-list.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/macro/macro-segment-list.cpp b/lib/macro/macro-segment-list.cpp index f9bdb101..b9f683ec 100644 --- a/lib/macro/macro-segment-list.cpp +++ b/lib/macro/macro-segment-list.cpp @@ -201,6 +201,8 @@ bool MacroSegmentList::PopulateWidgetsFromCache(const Macro *macro) _contentLayout->addWidget(widget); widget->show(); } + // Widgets are now owned by the layout again, so the cache entry is stale. + _widgetCache.erase(it); adjustSize(); updateGeometry();