don't add separator if no tags available

This commit is contained in:
Damien Elmes 2009-05-09 06:24:32 +09:00
parent a36738c8ce
commit 41b98051b8

View file

@ -395,8 +395,9 @@ class EditDeck(QMainWindow):
for t in sortedtags: for t in sortedtags:
self.dialog.tagList.addItem(icon, t.replace("_", " ")) self.dialog.tagList.addItem(icon, t.replace("_", " "))
alltags.append(None) alltags.append(None)
self.dialog.tagList.insertSeparator( if sortedtags:
self.dialog.tagList.count()) self.dialog.tagList.insertSeparator(
self.dialog.tagList.count())
# fact tags # fact tags
alluser = sorted(self.deck.allTags()) alluser = sorted(self.deck.allTags())
for tag in alltags: for tag in alltags: