Fixed a tiny glitch, remove author button became always disabled even if not needed to. Copied from lp:~mahfiaz/openlp/author-delete-button-not-active-in-edit-dialog

This commit is contained in:
Tomas Groth 2014-10-27 13:58:59 +01:00
parent 6d2cfedd7e
commit 3d387cb296
1 changed files with 2 additions and 1 deletions

View File

@ -625,7 +625,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog, RegistryProperties):
"""
Remove the author from the list when the delete button is clicked.
"""
self.author_remove_button.setEnabled(False)
if self.authors_list_view.count() <= 2:
self.author_remove_button.setEnabled(False)
item = self.authors_list_view.currentItem()
row = self.authors_list_view.row(item)
self.authors_list_view.takeItem(row)