Prepare cut/copy/paste tempo-map sections

This currently asserts in Range::subtract, also ripple
is not yet implemented.
This commit is contained in:
Robin Gareus 2023-05-07 02:04:47 +02:00
parent 1d1a1e87ec
commit 63e0ac11ad
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -7256,7 +7256,18 @@ Session::cut_copy_section (timepos_t const& start, timepos_t const& end, timepos
add_command (new MementoCommand<Locations> (*_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 ();