From 9525af3dae257216826914ea26c666b6cc816e90 Mon Sep 17 00:00:00 2001 From: chrik5 Date: Mon, 22 Dec 2014 12:21:22 +0100 Subject: [PATCH] fix: empty image_tag list before copy new tags --- contrib/copy_attach_detach_tags.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/copy_attach_detach_tags.lua b/contrib/copy_attach_detach_tags.lua index f2b5f52..11288e4 100644 --- a/contrib/copy_attach_detach_tags.lua +++ b/contrib/copy_attach_detach_tags.lua @@ -26,10 +26,12 @@ dt.configuration.check_version(...,{2,0,0}) local image_tags = {} local function mcopy_tags() -local sel_images = dt.gui.selection() -local tag_list_tmp = {} -local hash = {} + local sel_images = dt.gui.selection() + local tag_list_tmp = {} + local hash = {} + -- empty tag table before copy new tags + image_tags = {} for _,image in ipairs(sel_images) do local image_tags_tmp = {} image_tags_tmp = dt.tags.get_tags(image)