From 5a78c997032b1d56ff31c0aad34744975c4640e2 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Wed, 23 Mar 2022 21:23:42 +0100 Subject: [PATCH] Ignore delete hotkey if macro tab is not in focus --- src/macro-tab.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/macro-tab.cpp b/src/macro-tab.cpp index 835bc23e..ab488870 100644 --- a/src/macro-tab.cpp +++ b/src/macro-tab.cpp @@ -603,6 +603,11 @@ void AdvSceneSwitcher::MinimizeConditions() void AdvSceneSwitcher::DeleteMacroSegementHotkey() { + if (!isActiveWindow() || !isAncestorOf(focusWidget()) || + !(ui->tabWidget->currentWidget()->objectName() == "macroTab")) { + return; + } + if (currentActionIdx != -1) { RemoveMacroAction(currentActionIdx); } else if (currentConditionIdx != -1) {