From 6a3de18069498881029f9b398391aed6ded9d840 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);