Don't block UI while running actions

This commit is contained in:
WarmUpTill 2026-03-27 22:39:25 +01:00
parent a28b800228
commit a4bbf1e596

View File

@ -428,10 +428,11 @@ bool Macro::RunActionsHelper(
}
if (action->Enabled()) {
action->LogAction();
bool actionResult = false;
action->WithLock([&action, &actionResult]() {
actionResult = action->PerformAction();
std::shared_ptr<MacroAction> actionCopy;
action->WithLock([&action, &actionCopy]() {
actionCopy = action->Copy();
});
bool actionResult = actionCopy->PerformAction();
actionsExecutedSuccessfully =
actionsExecutedSuccessfully && actionResult;
} else {