forked from openlp/openlp
Don't allow a song to be saved without an author
This commit is contained in:
parent
830e3d6624
commit
691247ffda
@ -214,6 +214,12 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog, RegistryProperties):
|
|||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
message=translate('SongsPlugin.EditSongForm', 'You need to type in at least one verse.'))
|
message=translate('SongsPlugin.EditSongForm', 'You need to type in at least one verse.'))
|
||||||
return False
|
return False
|
||||||
|
if self.authors_list_view.count() == 0:
|
||||||
|
self.song_tab_widget.setCurrentIndex(1)
|
||||||
|
self.authors_list_view.setFocus()
|
||||||
|
critical_error_message_box(
|
||||||
|
message=translate('SongsPlugin.EditSongForm', 'You need to have an author for this song.'))
|
||||||
|
return False
|
||||||
if self.verse_order_edit.text():
|
if self.verse_order_edit.text():
|
||||||
result = self._validate_verse_list(self.verse_order_edit.text(), self.verse_list_widget.rowCount())
|
result = self._validate_verse_list(self.verse_order_edit.text(), self.verse_list_widget.rowCount())
|
||||||
if not result:
|
if not result:
|
||||||
|
Loading…
Reference in New Issue
Block a user