From cd332a2af079fbd942981357cbaa923bf04843cc Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Sun, 15 May 2022 10:37:49 -0500 Subject: [PATCH] when pasting a Range of automation, first add guard points, so the automation data before and after this range is retained --- libs/evoral/ControlList.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/evoral/ControlList.cc b/libs/evoral/ControlList.cc index 85371785a6..c8246ecc51 100644 --- a/libs/evoral/ControlList.cc +++ b/libs/evoral/ControlList.cc @@ -1978,6 +1978,11 @@ ControlList::paste (const ControlList& alist, timepos_t const & time) return false; } + /* when pasting a range of automation, first add guard points so the automation data before and after this range is retained */ + const ControlEvent* last = alist.back(); + add_guard_point (time, -GUARD_POINT_DELTA); + add_guard_point (time + last->when, GUARD_POINT_DELTA); + { Glib::Threads::RWLock::WriterLock lm (_lock); iterator where;