From ae2b41654629d6b9e05eff64f60c15f94504858d Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Wed, 29 Apr 2026 16:44:48 +0200 Subject: [PATCH] Clear macros on shutdown This was done implicitly in the shutdown handler by clearing the plugin's settings. Due to unwanted side effects this behavior has been disabled for the shutdown and thus macros have to be cleared explicitly on shutdown. --- lib/macro/macro.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/macro/macro.cpp b/lib/macro/macro.cpp index 2ae9a5c5..55e68c9b 100644 --- a/lib/macro/macro.cpp +++ b/lib/macro/macro.cpp @@ -17,6 +17,17 @@ namespace advss { +static bool setup() +{ + AddPluginCleanupStep([]() { + GetTopLevelMacros().clear(); + GetTemporaryMacros().clear(); + }); + return true; +} + +static bool setupDone = setup(); + Macro::Macro(const std::string &name) : _dockSettings(this) { SetName(name);