Commit TempoChange undo operation after map update

Tempo Map updates can change a region's position/length, in which case
region-automation may follow the region, and DiskReader:: playlist_ranges_moved
will save additional undo information.

These MementoCommand(s) need to be included in the undo operation.
This commit is contained in:
Robin Gareus 2022-10-23 23:21:08 +02:00
parent f9edc474ef
commit c437d6f886
4 changed files with 17 additions and 17 deletions

View file

@ -13,7 +13,11 @@ function factory () return function ()
tm:set_tempo (Temporal.Tempo (140, 120, 4), Temporal.timepos_t (0))
tm:set_tempo (Temporal.Tempo (120, 80, 4), Temporal.timepos_t.from_ticks (Temporal.ticks_per_beat * 4))
tm:set_tempo (Temporal.Tempo (80, 80, 4), Temporal.timepos_t.from_ticks (Temporal.ticks_per_beat * 4))
Session:begin_reversible_command ("Change Tempo Map")
Temporal.TempoMap.update (tm)
if not Session:abort_empty_reversible_command () then
Session:commit_reversible_command (nil)
end
tm = nil
-- Abort Edit example