mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-16 16:20:50 +02:00
First commit
If any of the commands are cancels, an entry for the macro remains in history.
This commit is contained in:
parent
4f129ae0af
commit
d966303558
@ -966,19 +966,16 @@ bool MacroCommands::ApplyMacro(
|
||||
if (proj) {
|
||||
ProjectHistory::Get(*proj).PushState(longDesc, shortDesc);
|
||||
}
|
||||
|
||||
// Upon exit of the top level apply, roll back the state if
|
||||
// an error occurs.
|
||||
auto cleanup2 = finally([&] {
|
||||
if (!res) {
|
||||
if (proj) {
|
||||
// Macro failed or was cancelled; revert to the previous state
|
||||
ProjectHistory::Get(*proj).RollbackState();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Upon exit of the top level apply, roll back the state if an error occurs.
|
||||
auto cleanup2 = finally([&] {
|
||||
if (MacroReentryCount == 1 && !res && proj) {
|
||||
// Macro failed or was cancelled; revert to the previous state
|
||||
ProjectHistory::Get(*proj).RollbackState();
|
||||
}
|
||||
});
|
||||
|
||||
mAbort = false;
|
||||
|
||||
size_t i = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user