From ed06633253431331382057c95826b41c0cc49117 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 18 Jul 2019 08:57:03 +0530 Subject: [PATCH] Manage tags dialog: When searching for a tag also search the "Was" column to see if the original tag name matches. Fixes #1836813 [[Enhancement]Tag Manager edits lost with Find](https://bugs.launchpad.net/calibre/+bug/1836813) --- src/calibre/gui2/dialogs/tag_list_editor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/dialogs/tag_list_editor.py b/src/calibre/gui2/dialogs/tag_list_editor.py index 09a07f6d08..6f834020c2 100644 --- a/src/calibre/gui2/dialogs/tag_list_editor.py +++ b/src/calibre/gui2/dialogs/tag_list_editor.py @@ -242,7 +242,11 @@ class TagListEditor(QDialog, Ui_TagListEditor): self.fill_in_table(None, None) result = [] for k in self.ordered_tags: - if search_for in icu_lower(unicode_type(self.all_tags[k]['cur_name'])): + tag = self.all_tags[k] + if ( + search_for in icu_lower(unicode_type(tag['cur_name'])) or + search_for in icu_lower(unicode_type(self.original_names.get(tag['key'], ''))) + ): result.append(k) self.fill_in_table(result, None)