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

Define UndoManager::VisitStates

This commit is contained in:
Paul Licameli
2019-07-18 13:17:10 -04:00
parent d49a888b98
commit 490271f259
4 changed files with 62 additions and 29 deletions

View File

@@ -183,8 +183,8 @@ void OnUndo(const CommandContext &context)
}
undoManager.Undo(
[&]( const UndoState &state ){
ProjectHistory::Get( project ).PopState( state ); } );
[&]( const UndoStackElem &elem ){
ProjectHistory::Get( project ).PopState( elem.state ); } );
auto t = *tracks.Selected().begin();
if (!t)
@@ -213,8 +213,8 @@ void OnRedo(const CommandContext &context)
}
undoManager.Redo(
[&]( const UndoState &state ){
ProjectHistory::Get( project ).PopState( state ); } );
[&]( const UndoStackElem &elem ){
ProjectHistory::Get( project ).PopState( elem.state ); } );
auto t = *tracks.Selected().begin();
if (!t)