From b17aa304329989c27eeeef449e9f060e1a411631 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Wed, 4 Jun 2025 20:07:02 +0200 Subject: [PATCH] Fix attempting to cache widgets of about to be deleted macros --- lib/macro/macro-tab.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/macro/macro-tab.cpp b/lib/macro/macro-tab.cpp index aa6df43b..f8158a79 100644 --- a/lib/macro/macro-tab.cpp +++ b/lib/macro/macro-tab.cpp @@ -207,13 +207,11 @@ void AdvSceneSwitcher::RemoveMacro(std::shared_ptr ¯o) clearWidgetCache(macro.get()); } - // Currently shown macro will always be part of the macros to be - // removed, so, we clear the widgets as they should not be cached - ui->conditionsList->Clear(); - ui->actionsList->Clear(); - ui->elseActionsList->Clear(); - + // Don't cache widgets for about to be deleted macros + MacroSegmentList::SetCachingEnabled(false); ui->macros->Remove(macro); + MacroSegmentList::SetCachingEnabled(!switcher->disableMacroWidgetCache); + emit MacroRemoved(name); }