Skip to content

Commit d4a479b

Browse files
authored
Merge pull request darktable-org#486 from wpferguson/ensure_renamed_image_visible
ensure renamed image is visible
2 parents dd22c94 + 94f41db commit d4a479b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contrib/rename_images.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ end
214214

215215
local function do_rename(images)
216216
if #images > 0 then
217+
local first_image = images[1]
217218
local pattern = rename.widgets.pattern.text
218219
dt.preferences.write(MODULE_NAME, "pattern", "string", pattern)
219220
dt.print_log("pattern is " .. pattern)
@@ -256,6 +257,7 @@ local function do_rename(images)
256257
stop_job(job)
257258
local collect_rules = dt.gui.libs.collect.filter()
258259
dt.gui.libs.collect.filter(collect_rules)
260+
dt.gui.views.lighttable.set_image_visible(first_image)
259261
dt.print(string.format(_("renamed %d images"), #images))
260262
else -- pattern length
261263
dt.print_error("no pattern supplied, returning...")

0 commit comments

Comments
 (0)