1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

New attached structure ProjectManager handles project lifetime...

... that is, a factory function, open, close, import, undo/redo/rollback.

Also the callbacks from AudioIO, which need to invoke undo history push when
recording stops.

It is meant as a high-level class using several of the other things attached
to the project, while AudacityProject will be a low level class acting mostly
as just the container of the attached structures.
This commit is contained in:
Paul Licameli
2019-04-29 02:22:08 -04:00
parent c629d44c41
commit 4274d44ab7
50 changed files with 706 additions and 551 deletions

View File

@@ -254,7 +254,7 @@ void HistoryWindow::OnDiscard(wxCommandEvent & WXUNUSED(event))
mSelected -= i;
mManager->RemoveStates(i);
mProject->SetStateTo(mSelected + 1);
ProjectManager::Get( *mProject ).SetStateTo(mSelected + 1);
while(--i >= 0)
mList->DeleteItem(i);
@@ -292,7 +292,7 @@ void HistoryWindow::OnItemSelected(wxListEvent &event)
// entry. Doing so can cause unnecessary delays upon initial load or while
// clicking the same entry over and over.
if (selected != mSelected) {
mProject->SetStateTo(selected + 1);
ProjectManager::Get( *mProject ).SetStateTo(selected + 1);
}
mSelected = selected;