Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions contrib/rename_images.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ local function do_rename(images)
end
end

local function reset_callback()
rename.widgets.pattern.text = ""
end

-- - - - - - - - - - - - - - - - - - - - - - - -
-- W I D G E T S
Expand All @@ -196,7 +193,11 @@ end
rename.widgets.pattern = dt.new_widget("entry"){
tooltip = ds.get_substitution_tooltip(),
placeholder = _("enter pattern") .. "$(FILE_FOLDER)/$(FILE_NAME)",
text = ""
text = "",
reset_callback = function(self)
self.text = ""
dt.preferences.write(MODULE_NAME, "pattern", "string", self.text)
end
}

local pattern_pref = dt.preferences.read(MODULE_NAME, "pattern", "string")
Expand Down