From 84506a041c10ee592e485bc99822f0658f63718c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 9 Aug 2024 16:03:39 +0200 Subject: [PATCH] Move Mute automation with region(s) #9762 Mute and Panner are the only automatable Route owned controls (that are not managed by a processor). So they need special casing to be moved when moving a region. --- libs/ardour/disk_reader.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc index 55374b5175..d812648759 100644 --- a/libs/ardour/disk_reader.cc +++ b/libs/ardour/disk_reader.cc @@ -1375,7 +1375,7 @@ DiskReader::playlist_ranges_moved (list const& movements, b return; } - /* move panner automation */ + /* move panner automation (route owned control) */ std::shared_ptr pannable = _track.pannable (); Evoral::ControlSet::Controls& c (pannable->controls ()); @@ -1395,6 +1395,18 @@ DiskReader::playlist_ranges_moved (list const& movements, b *alist.get (), &before, &alist->get_state ())); } } + + /* move mute automation (route owned control) */ + std::shared_ptr alist = _track.mute_control ()->alist (); + if (alist->size ()) { + XMLNode& before = alist->get_state (); + bool const things_moved = alist->move_ranges (movements); + if (things_moved) { + _session.add_command (new MementoCommand ( + *alist.get (), &before, &alist->get_state ())); + } + } + /* move processor automation */ _track.foreach_processor (boost::bind (&DiskReader::move_processor_automation, this, _1, movements)); }