diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/session.h | 1 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index d1b64f2e5c..552c8e203a 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -747,6 +747,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop void begin_reversible_command (const std::string& cmd_name); void begin_reversible_command (GQuark); + void abort_reversible_command (); void commit_reversible_command (Command* cmd = 0); void add_command (Command *const cmd) { diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index c626e792ea..7aac354c06 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -2434,6 +2434,17 @@ Session::begin_reversible_command (GQuark q) } void +Session::abort_reversible_command () +{ + if (_current_trans != 0) { + _current_trans->clear(); + delete _current_trans; + _current_trans = 0; + _current_trans_quarks.clear(); + } +} + +void Session::commit_reversible_command (Command *cmd) { assert (_current_trans); |