From a20d3a2ae80fad10b288662db34d79199531c255 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 23 Mar 2011 08:25:03 -0600 Subject: [PATCH] Fix #740890 (Tag editor shouldn't add empty tags) --- src/calibre/gui2/dialogs/tag_editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/dialogs/tag_editor.py b/src/calibre/gui2/dialogs/tag_editor.py index 6bd8eb7dbe..bf3bb9fd4e 100644 --- a/src/calibre/gui2/dialogs/tag_editor.py +++ b/src/calibre/gui2/dialogs/tag_editor.py @@ -122,6 +122,8 @@ class TagEditor(QDialog, Ui_TagEditor): tags = unicode(self.add_tag_input.text()).split(',') for tag in tags: tag = tag.strip() + if not tag: + continue for item in self.available_tags.findItems(tag, Qt.MatchFixedString): self.available_tags.takeItem(self.available_tags.row(item)) if tag not in self.tags: