Fix #1909251 [Enhancement Request: Tag Manager - Copy nonexistent filters to Add field](https://bugs.launchpad.net/calibre/+bug/1909251)

This commit is contained in:
Kovid Goyal 2021-01-20 13:28:44 +05:30
parent 58b4fd3fe3
commit 65766fdff2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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()