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

Bug2531: need progress indication when discarding undo history...

... You may see this also when abandoning lots of redo history, and not only
when doing compaction.

If in compaction you discard much undo and also much redo, you may see two
progresses.

It's debatable whether this might have been better implemented by reuse of
ProjectFileIO::DeleteBlocks instead, putting callbacks to a progress indicator
in the function InSet().  But I wanted to avoid more dependency onto
ProjectFileIO.

Doing real work in DeleteBlocks() is supposed to happen only if there is a bug
elsewhere that allowed orphans.  So, still no progress indicator there.
This commit is contained in:
Paul Licameli
2020-09-06 09:28:40 -04:00
parent dfd313f8fa
commit 8a86fe139f
4 changed files with 76 additions and 0 deletions

View File

@@ -172,6 +172,8 @@ class AUDACITY_DLL_API UndoManager final
// void Debug(); // currently unused
private:
size_t EstimateRemovedBlocks(size_t begin, size_t end);
void RemoveStateAt(int n);
AudacityProject &mProject;