From 9c102fa8d20b932f9a9879298764c0351a0e5acc Mon Sep 17 00:00:00 2001 From: nick_m Date: Sun, 27 Sep 2015 00:57:52 +1000 Subject: Make automation record undo per pass rather than per touch. --- libs/ardour/automatable.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libs/ardour/automatable.cc') diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 0b316890bc..1c72f202b2 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -365,7 +365,7 @@ Automatable::transport_located (framepos_t now) boost::shared_ptr l = boost::dynamic_pointer_cast(c->list()); - if (l) { + if (l && l->automation_state () == Write) { l->start_write_pass (now); } } @@ -394,7 +394,12 @@ Automatable::transport_stopped (framepos_t now) when the transport is re-started, a touch will magically be happening without it ever have being started in the usual way. */ + const bool list_did_write = !l->in_new_write_pass (); + l->stop_touch (true, now); + if (list_did_write) { + c->commit_transaction (); + } l->write_pass_finished (now, Config->get_automation_thinning_factor()); if (l->automation_playback()) { -- cgit v1.2.3