Add hotkey to create new macro

This commit is contained in:
WarmUpTill
2025-05-22 21:59:40 +02:00
committed by WarmUpTill
parent 5e3ab19940
commit 5490fabf92
10 changed files with 49 additions and 26 deletions

View File

@@ -100,6 +100,13 @@ bool AdvSceneSwitcher::AddNewMacro(std::shared_ptr<Macro> &res,
void AdvSceneSwitcher::on_macroAdd_clicked()
{
// Hotkey to add new macro will also use this function.
// Since we don't want the hotkey to have an effect if the macro tab is
// not focused we need to check this here.
if (!MacroTabIsInFocus()) {
return;
}
std::string name;
std::shared_ptr<Macro> newMacro;
if (!AddNewMacro(newMacro, name)) {