Bug2579: Don't corrupt project after compact the exit without save...
... also may improve compaction by clearing mLastSavedTracks first
This commit is contained in:
parent
ea76b7c9f7
commit
8ac1cb75aa
|
@ -1269,6 +1269,9 @@ void ProjectFileManager::Compact()
|
|||
if (&mProject == clipboard.Project().lock().get())
|
||||
clipboard.Clear();
|
||||
|
||||
// This may also decrease some reference counts on blocks
|
||||
mLastSavedTracks.reset();
|
||||
|
||||
// Refresh the before space usage since it may have changed due to the
|
||||
// above actions.
|
||||
auto before = wxFileName::GetSize(projectFileIO.GetFileName());
|
||||
|
@ -1286,5 +1289,5 @@ void ProjectFileManager::Compact()
|
|||
}
|
||||
}
|
||||
|
||||
currentTracks.reset();
|
||||
mLastSavedTracks = currentTracks;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue