mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Create a trap for overlapping or nested undo commands
This commit is contained in:
parent
9c9273e694
commit
c44d692390
1 changed files with 8 additions and 0 deletions
|
|
@ -3161,6 +3161,14 @@ Session::begin_reversible_command (const string& name)
|
||||||
void
|
void
|
||||||
Session::begin_reversible_command (GQuark q)
|
Session::begin_reversible_command (GQuark q)
|
||||||
{
|
{
|
||||||
|
if (_current_trans) {
|
||||||
|
cerr << "An UNDO transaction was started while a prior command was underway. Aborting command (" << g_quark_to_string (q) << ") and prior (" << _current_trans->name() << ")" << endl;
|
||||||
|
PBD::warning << "An UNDO transaction was started while a prior command was underway. Aborting command (" << g_quark_to_string (q) << ") and prior (" << _current_trans->name() << ")" << endmsg;
|
||||||
|
abort_reversible_command();
|
||||||
|
assert (false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* If nested begin/commit pairs are used, we create just one UndoTransaction
|
/* If nested begin/commit pairs are used, we create just one UndoTransaction
|
||||||
to hold all the commands that are committed. This keeps the order of
|
to hold all the commands that are committed. This keeps the order of
|
||||||
commands correct in the history.
|
commands correct in the history.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue