1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

New class ProjectHistory split from ProjectManager for undo, etc...

... And yet fewer inclusions of Projectmanager.h, though it's still not yet
free of cycles
This commit is contained in:
Paul Licameli
2019-06-06 09:55:34 -04:00
parent 7857d59f57
commit f03684db4f
53 changed files with 581 additions and 456 deletions

View File

@@ -25,7 +25,7 @@ processing. See also MacrosWindow and ApplyMacroDialog.
#include <wx/textfile.h>
#include "Project.h"
#include "ProjectManager.h"
#include "ProjectHistory.h"
#include "ProjectSettings.h"
#include "commands/CommandManager.h"
#include "effects/EffectManager.h"
@@ -843,7 +843,7 @@ bool MacroCommands::ApplyMacro(
if (!res) {
if(proj) {
// Macro failed or was cancelled; revert to the previous state
ProjectManager::Get( *proj ).RollbackState();
ProjectHistory::Get( *proj ).RollbackState();
}
}
} );
@@ -889,7 +889,7 @@ bool MacroCommands::ApplyMacro(
if (!proj)
return false;
if( MacroReentryCount <= 1 )
ProjectManager::Get( *proj ).PushState(longDesc, shortDesc);
ProjectHistory::Get( *proj ).PushState(longDesc, shortDesc);
return true;
}