Manage tags dialog: If tags are present in the add tags input when OK is clicked, add them automatically, without needing to click the plus button first

This commit is contained in:
Kovid Goyal 2022-06-06 08:41:53 +05:30
parent 741ecc3cce
commit cf3ca9395e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -216,6 +216,8 @@ class TagEditor(QDialog, Ui_TagEditor):
collection.model().setFilterFixedString(filter_value or '')
def accept(self):
if self.add_tag_input.text().strip():
self.add_tag()
self.tags = self._get_applied_tags_box_contents()
self.save_state()
return QDialog.accept(self)