1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-23 17:25:54 +01:00

Don't clear clipboard unnecessarily in ProjectFileManager::Compact()

This commit is contained in:
Paul Licameli
2020-11-17 17:13:17 -05:00
parent 716139494d
commit ea76b7c9f7

View File

@@ -1265,8 +1265,9 @@ void ProjectFileManager::Compact()
auto numStates = undoManager.GetNumStates();
undoManager.RemoveStates(0, numStates - 1);
// And clear the clipboard
clipboard.Clear();
// And clear the clipboard, if needed
if (&mProject == clipboard.Project().lock().get())
clipboard.Clear();
// Refresh the before space usage since it may have changed due to the
// above actions.