From 63e0ac11ad50fd9531bb2f5e9584d8df62ee3c29 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 7 May 2023 02:04:47 +0200 Subject: [PATCH] Prepare cut/copy/paste tempo-map sections This currently asserts in Range::subtract, also ripple is not yet implemented. --- libs/ardour/session.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 4a700a62ce..f79f1bc93c 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -7256,7 +7256,18 @@ Session::cut_copy_section (timepos_t const& start, timepos_t const& end, timepos add_command (new MementoCommand (*_locations, &before, &after)); } - // TODO: update Tempo-Map +#if 0 // TODO - enable once tempo-map cut/copy/paste works + TempoMap::WritableSharedPtr wmap = TempoMap::write_copy (); + TempoMapCutBuffer* tmcb; + if (copy) { + tmcb = wmap->copy (start, end); + } else { + tmcb = wmap->cut (start, end, true); + } + wmap->paste (*tmcb, to, !copy); + TempoMap::update (wmap); + delete tmcb; +#endif if (!abort_empty_reversible_command ()) { commit_reversible_command ();