mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 08:09:32 +02:00
Require UndoManager to have empty history when destroying it...
...which is a justified assumption now. Do not call ClearStates(). Do not attempt to repopulate ConnectionPtr if the project is being destroyed.
This commit is contained in:
parent
49fc197e42
commit
7c9e824943
@ -89,7 +89,7 @@ UndoManager::UndoManager( AudacityProject &project )
|
||||
|
||||
UndoManager::~UndoManager()
|
||||
{
|
||||
ClearStates();
|
||||
wxASSERT( stack.empty() );
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -107,6 +107,8 @@ inline UndoPush operator | (UndoPush a, UndoPush b)
|
||||
inline UndoPush operator & (UndoPush a, UndoPush b)
|
||||
{ return static_cast<UndoPush>(static_cast<int>(a) & static_cast<int>(b)); }
|
||||
|
||||
//! Maintain a non-persistent list of states of the project, to support undo and redo commands
|
||||
/*! The history should be cleared before destruction */
|
||||
class AUDACITY_DLL_API UndoManager final
|
||||
: public ClientData::Base
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user