refactor: code formatting fixes
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
parent
f1e44c6acf
commit
420181d531
|
@ -11,26 +11,26 @@ function factory()
|
|||
-- corresponding to a [selected] region
|
||||
function find_track_for_region(region_id)
|
||||
for route in Session:get_tracks():iter() do
|
||||
local track = route:to_track();
|
||||
local pl = track:playlist ()
|
||||
local track = route:to_track()
|
||||
local pl = track:playlist()
|
||||
if not pl:region_by_id(region_id):isnil() then
|
||||
return track
|
||||
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
|
||||
|
||||
return function()
|
||||
local sel = Editor:get_selection () -- get current selection
|
||||
local sel = Editor:get_selection() -- get current selection
|
||||
local loc = Session:locations() -- get locations
|
||||
|
||||
-- prepare undo operation
|
||||
Session:begin_reversible_command ("Rename regions from markers")
|
||||
Session:begin_reversible_command("Rename regions from markers")
|
||||
|
||||
-- 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
|
||||
local ar = region:to_audioregion ()
|
||||
local ar = region:to_audioregion()
|
||||
if ar:isnil() then
|
||||
goto next
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue