mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #740890 (Tag editor shouldn't add empty tags)
This commit is contained in:
parent
5c06f567d9
commit
a20d3a2ae8
@ -122,6 +122,8 @@ class TagEditor(QDialog, Ui_TagEditor):
|
|||||||
tags = unicode(self.add_tag_input.text()).split(',')
|
tags = unicode(self.add_tag_input.text()).split(',')
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
tag = tag.strip()
|
tag = tag.strip()
|
||||||
|
if not tag:
|
||||||
|
continue
|
||||||
for item in self.available_tags.findItems(tag, Qt.MatchFixedString):
|
for item in self.available_tags.findItems(tag, Qt.MatchFixedString):
|
||||||
self.available_tags.takeItem(self.available_tags.row(item))
|
self.available_tags.takeItem(self.available_tags.row(item))
|
||||||
if tag not in self.tags:
|
if tag not in self.tags:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user