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