1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +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

@@ -84,6 +84,7 @@ It handles initialization and termination by subclassing wxApp.
#include "PluginManager.h"
#include "Project.h"
#include "ProjectAudioIO.h"
#include "ProjectHistory.h"
#include "ProjectManager.h"
#include "ProjectSettings.h"
#include "ProjectWindow.h"
@@ -899,7 +900,7 @@ bool AudacityApp::MRUOpen(const FilePath &fullPathStr) {
// bad things can happen, including data files moving to the NEW
// project directory, etc.
if (proj && (
ProjectManager::Get( *proj ).GetDirty() ||
ProjectHistory::Get( *proj ).GetDirty() ||
!TrackList::Get( *proj ).empty()
) )
proj = nullptr;
@@ -1081,7 +1082,7 @@ bool AudacityApp::OnExceptionInMainLoop()
// Restore the state of the project to what it was before the
// failed operation
if (pProject) {
ProjectManager::Get( *pProject ).RollbackState();
ProjectHistory::Get( *pProject ).RollbackState();
// Forget pending changes in the TrackList
TrackList::Get( *pProject ).ClearPendingTracks();