First round of Lua script API updates

This commit is contained in:
Robin Gareus 2022-09-27 05:06:13 +02:00
parent 395bf4a650
commit 30a92894fc
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
8 changed files with 34 additions and 31 deletions

View file

@ -138,7 +138,7 @@ function factory () return function ()
local playlist = track:playlist ()
playlist:to_stateful ():clear_changes () -- prepare undo
playlist:remove_region (r)
playlist:add_region (nar, r:position (), 1, false, 0, 0, false)
playlist:add_region (nar, r:position (), 1, false)
-- create a diff of the performed work, add it to the session's undo stack
-- and check if it is not empty
if not Session:add_stateful_diff_command (playlist:to_statefuldestructible ()):empty () then