diff --git a/lib/macro/macro-run-button.cpp b/lib/macro/macro-run-button.cpp index cc458f56..5f0e96b5 100644 --- a/lib/macro/macro-run-button.cpp +++ b/lib/macro/macro-run-button.cpp @@ -108,7 +108,7 @@ void MacroRunButton::Pressed() const bool abortMacro = DisplayMessage( err.arg(QString::fromStdString(macro->Name())), true); if (abortMacro) { - macro->Stop(); + macro->SignalStop(); } } diff --git a/lib/macro/macro.cpp b/lib/macro/macro.cpp index c0000880..60879737 100644 --- a/lib/macro/macro.cpp +++ b/lib/macro/macro.cpp @@ -552,6 +552,12 @@ Macro::PauseStateSaveBehavior Macro::GetPauseStateSaveBehavior() const return _pauseSaveBehavior; } +void Macro::SignalStop() +{ + _stop = true; + GetMacroWaitCV().notify_all(); +} + void Macro::Stop() { _stop = true; diff --git a/lib/macro/macro.hpp b/lib/macro/macro.hpp index 1a8800db..aecf8efc 100644 --- a/lib/macro/macro.hpp +++ b/lib/macro/macro.hpp @@ -61,7 +61,7 @@ public: PauseStateSaveBehavior GetPauseStateSaveBehavior() const; void Stop(); - void SignalStop() { _stop = true; } + void SignalStop(); bool GetStop() const { return _stop; } void ResetTimers();