13
0

Keep the search term in the dialog box.

When user wants to keep the dialog box open, it's probably with the intention to edit the search term rather than typing it from scratch again.
This commit is contained in:
Maciej Bliziński 2023-09-08 19:38:55 +01:00 committed by Robin Gareus
parent c0287cb0de
commit 1c8b91ed86
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -6,12 +6,13 @@ ardour { ["type"] = "EditorAction", name = "Search and Jump to Marker",
function factory () return function () function factory () return function ()
local keep = false local keep = false
local search_term = ''
::restart:: ::restart::
local dlg = LuaDialog.Dialog ("Search and Jump to Marker", local dlg = LuaDialog.Dialog ("Search and Jump to Marker",
{ {
{ type = "entry", key = "marker", default = '', title = "Marker Prefix" }, { type = "entry", key = "marker", default = search_term, title = "Marker Prefix" },
{ type = "checkbox", key = "keep", default = keep, title = "Keep Dialog Open" }, { type = "checkbox", key = "keep", default = keep, title = "Keep Dialog Open" },
}) })
@ -23,6 +24,8 @@ function factory () return function ()
if (rv['marker'] == "") then if (rv['marker'] == "") then
if keep then goto restart end if keep then goto restart end
return return
else
search_term = rv['marker']
end end
for l in Session:locations():list():iter() do for l in Session:locations():list():iter() do