| 92 | } |
| 93 | |
| 94 | void MacroRunButton::Pressed() |
| 95 | { |
| 96 | auto macro = _macros->GetCurrentMacro(); |
| 97 | if (!macro) { |
| 98 | return; |
| 99 | } |
| 100 | |
| 101 | bool ret = _elseStateActive ? macro->PerformActions(false, true, true) |
| 102 | : macro->PerformActions(true, true, true); |
| 103 | if (ret) { |
| 104 | return; |
| 105 | } |
| 106 | |
| 107 | QString err = obs_module_text("AdvSceneSwitcher.macroTab.runFail"); |
| 108 | const bool abortMacro = DisplayMessage( |
| 109 | err.arg(QString::fromStdString(macro->Name())), true); |
| 110 | if (abortMacro) { |
| 111 | macro->SignalStop(); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | } // namespace advss |
nothing calls this directly
no test coverage detected