From 65766fdff2afd63dd7a70e247711f9835cb36277 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 20 Jan 2021 13:28:44 +0530 Subject: [PATCH] Fix #1909251 [Enhancement Request: Tag Manager - Copy nonexistent filters to Add field](https://bugs.launchpad.net/calibre/+bug/1909251) --- src/calibre/gui2/dialogs/tag_editor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/dialogs/tag_editor.py b/src/calibre/gui2/dialogs/tag_editor.py index 8a8904b27a..653f7a9e77 100644 --- a/src/calibre/gui2/dialogs/tag_editor.py +++ b/src/calibre/gui2/dialogs/tag_editor.py @@ -153,6 +153,10 @@ class TagEditor(QDialog, Ui_TagEditor): items = self.available_tags.selectedItems() if item is None else [item] rows = [self.available_tags.row(i) for i in items] if not rows: + text = self.available_filter_input.text() + if text and text.strip(): + self.add_tag_input.setText(text) + self.add_tag_input.setFocus(Qt.FocusReason.OtherFocusReason) return row = max(rows) tags = self._get_applied_tags_box_contents()