I mentioned this in the past that the “Add Audio Track” Lua script that comes with Ardour does not work.
After you assign it to a toolbar button, it works once and then if you click on it again it opens the “Add Shortcut or Lua Script” dialog.
I was wondering if anyone would be willing to fix this?
Not sure if any other scripts no longer work?
Seems like if they are included they should probably work?
…
function factory () return function ()
local sel = Editor:get_selection ()
if not sel:empty () and not sel.tracks:routelist ():empty () then
…
instead of this last commit:
…
function factory () return function ()
local sel = Editor:get_selection ()
if not Editor:get_selection ():empty () and not Editor:get_selection ().tracks:routelist ():empty () then
…
Either works, but wouldn’t the first example using the assigned local variable be “best practices”?
Robin
Yeah that was strange behavior to work but to only work once.
I was able to test this update out and everything seems to work as expected now.
Thank you very much for making this update.