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

AUP3: Added AUP3 importer and improved progress dialogs

This commit is contained in:
Leland Lucius
2020-07-15 01:32:48 -05:00
parent 1ec7fd56c1
commit 5bc3ae659c
10 changed files with 574 additions and 194 deletions

View File

@@ -674,14 +674,25 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event)
// Cleanup the project file
//
// Might be that we want to UndoManager::ClearStates() before this???
if (!projectFileIO.IsTemporary())
bool vacuumed = false;
if (!projectFileIO.IsTemporary() && settings.GetCompactAtClose())
{
projectFileIO.Vacuum();
vacuumed = projectFileIO.Vacuum();
}
// See ProjectFileIO::Bypass() for a description
projectFileIO.Bypass(true);
// Not sure if this has to come later in the shutdown process, but doing
// it before the project window is destroyed looks better when huge states
// need to be cleaned up.
if (!vacuumed)
{
// This must be done before the following Deref() since it holds
// references to the DirManager.
UndoManager::Get( project ).ClearStates();
}
#ifdef __WXMAC__
// Fix bug apparently introduced into 2.1.2 because of wxWidgets 3:
// closing a project that was made full-screen (as by clicking the green dot
@@ -777,10 +788,6 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event)
// Delete all the tracks to free up memory and DirManager references.
tracks.Clear();
// This must be done before the following Deref() since it holds
// references to the DirManager.
UndoManager::Get( project ).ClearStates();
// Remove self from the global array, but defer destruction of self
auto pSelf = AllProjects{}.Remove( project );
wxASSERT( pSelf );