From f99a6f0056afda648df251a792d70d63cf45b073 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 10 Jun 2011 10:21:34 -0600 Subject: [PATCH] ... --- src/calibre/gui2/metadata/single.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/metadata/single.py b/src/calibre/gui2/metadata/single.py index 099831ccba..b62aa28a68 100644 --- a/src/calibre/gui2/metadata/single.py +++ b/src/calibre/gui2/metadata/single.py @@ -315,7 +315,7 @@ class MetadataSingleDialogBase(ResizableDialog): show=True) return - def update_from_mi(self, mi, update_sorts=True): + def update_from_mi(self, mi, update_sorts=True, merge_tags=True): if not mi.is_null('title'): self.title.current_val = mi.title if update_sorts: @@ -334,7 +334,11 @@ class MetadataSingleDialogBase(ResizableDialog): if not mi.is_null('publisher'): self.publisher.current_val = mi.publisher if not mi.is_null('tags'): - self.tags.current_val = mi.tags + old_tags = self.tags.current_val + tags = mi.tags if mi.tags else [] + if old_tags and merge_tags: + tags += old_tags + self.tags.current_val = tags if not mi.is_null('identifiers'): current = self.identifiers.current_val current.update(mi.identifiers)