refactor: code formatting fixes

Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
Christopher Arndt 2024-01-22 11:25:07 +01:00
parent f1e44c6acf
commit 420181d531
1 changed files with 7 additions and 7 deletions

View File

@ -11,26 +11,26 @@ function factory()
-- corresponding to a [selected] region -- corresponding to a [selected] region
function find_track_for_region(region_id) function find_track_for_region(region_id)
for route in Session:get_tracks():iter() do for route in Session:get_tracks():iter() do
local track = route:to_track(); local track = route:to_track()
local pl = track:playlist () local pl = track:playlist()
if not pl:region_by_id(region_id):isnil() then if not pl:region_by_id(region_id):isnil() then
return track return track
end end
end end
assert (0) -- can't happen, region must be in a playlist assert(0) -- can't happen, region must be in a playlist
end end
return function() return function()
local sel = Editor:get_selection () -- get current selection local sel = Editor:get_selection() -- get current selection
local loc = Session:locations() -- get locations local loc = Session:locations() -- get locations
-- prepare undo operation -- prepare undo operation
Session:begin_reversible_command ("Rename regions from markers") Session:begin_reversible_command("Rename regions from markers")
-- for each selected region... -- for each selected region...
for region in sel.regions:regionlist():iter () do for region in sel.regions:regionlist():iter() do
-- test if it's an audio region -- test if it's an audio region
local ar = region:to_audioregion () local ar = region:to_audioregion()
if ar:isnil() then if ar:isnil() then
goto next goto next
end end