13
0

do not allow undo/redo while actively recording

This commit is contained in:
Paul Davis 2016-08-17 19:21:45 -04:00
parent 214dfccdae
commit 41cc35cf6e
2 changed files with 25 additions and 7 deletions

View File

@ -874,13 +874,11 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
/** Undo some transactions. /** Undo some transactions.
* @param n Number of transactions to undo. * @param n Number of transactions to undo.
*/ */
void undo (uint32_t n) { void undo (uint32_t n);
_history.undo (n); /** Redo some transactions.
} * @param n Number of transactions to undo.
*/
void redo (uint32_t n) { void redo (uint32_t n);
_history.redo (n);
}
UndoHistory& history() { return _history; } UndoHistory& history() { return _history; }

View File

@ -4916,3 +4916,23 @@ Session::save_as (SaveAs& saveas)
return 0; return 0;
} }
void
Session::undo (uint32_t n)
{
if (actively_recording()) {
return;
}
_history.undo (n);
}
void
Session::redo (uint32_t n)
{
if (actively_recording()) {
return;
}
_history.redo (n);
}