Whoops, forgot about the first item being blank. Now the correct author is added.

This commit is contained in:
Raoul Snyman 2012-03-22 22:16:49 +02:00
parent d62fde1237
commit 5a42c87a92
1 changed files with 2 additions and 1 deletions

View File

@ -363,7 +363,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
item = int(self.authorsComboBox.currentIndex())
text = unicode(self.authorsComboBox.currentText()).strip(u' \r\n\t')
if text in self.authors:
item = self.authors.index(text)
# Index 0 is a blank string, so add 1
item = self.authors.index(text) + 1
if item == 0 and text:
if QtGui.QMessageBox.question(self,
translate('SongsPlugin.EditSongForm', 'Add Author'),