mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Bug2531 mitigation: Reduce the pause without progress dialog...
... Do so by lowering the usage of TransactionScope into UndoManager, so that deletion of blocks is more often grouped into a transaction, as when invoking Compact via the menu item.
This commit is contained in:
@@ -15,7 +15,6 @@ Paul Licameli split from AudacityProject.cpp
|
||||
#include "AdornedRulerPanel.h"
|
||||
#include "AudioIO.h"
|
||||
#include "Clipboard.h"
|
||||
#include "DBConnection.h"
|
||||
#include "FileNames.h"
|
||||
#include "Menus.h"
|
||||
#include "ModuleManager.h"
|
||||
@@ -741,16 +740,12 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event)
|
||||
projectFileIO.SetBypass();
|
||||
|
||||
{
|
||||
TransactionScope trans(projectFileIO.GetConnection(), "Shutdown");
|
||||
|
||||
// This can reduce reference counts of sample blocks in the project's
|
||||
// tracks.
|
||||
UndoManager::Get( project ).ClearStates();
|
||||
|
||||
// Delete all the tracks to free up memory
|
||||
tracks.Clear();
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
|
||||
// We're all done with the project file, so close it now
|
||||
|
||||
Reference in New Issue
Block a user