mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-10 06:36:24 +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:
@@ -135,6 +135,13 @@ public:
|
||||
/*! @return ids of all sample blocks created by this factory and still extant */
|
||||
virtual SampleBlockIDs GetActiveBlockIDs() = 0;
|
||||
|
||||
//! Type of function that is informed when a block is about to be deleted
|
||||
using BlockDeletionCallback = std::function< void(const SampleBlock&) >;
|
||||
|
||||
//! Install a callback, returning the previously installed callback
|
||||
virtual BlockDeletionCallback SetBlockDeletionCallback(
|
||||
BlockDeletionCallback callback ) = 0;
|
||||
|
||||
protected:
|
||||
// The override should throw more informative exceptions on error than the
|
||||
// default InconsistencyException thrown by Create
|
||||
|
||||
Reference in New Issue
Block a user