diff --git a/openlp/plugins/songs/forms/editsongdialog.py b/openlp/plugins/songs/forms/editsongdialog.py index 8f8954c44..3c8a7f175 100644 --- a/openlp/plugins/songs/forms/editsongdialog.py +++ b/openlp/plugins/songs/forms/editsongdialog.py @@ -283,7 +283,6 @@ class Ui_EditSongDialog(object): self.bottomLayout.setObjectName(u'bottomLayout') self.warningLabel = QtGui.QLabel(editSongDialog) self.warningLabel.setObjectName(u'warningLabel') - self.warningLabel.setVisible(False) self.bottomLayout.addWidget(self.warningLabel) self.buttonBox = create_button_box(editSongDialog, u'buttonBox', [u'cancel', u'save']) @@ -355,9 +354,10 @@ class Ui_EditSongDialog(object): translate('SongsPlugin.EditSongForm', '&Remove')) self.audioRemoveAllButton.setText( translate('SongsPlugin.EditSongForm', 'Remove &All')) - self.warningLabel.setText( - translate('SongsPlugin.EditSongForm', 'Warning:' - ' Not all of the verses are in use.')) + self.notAlllVersesUsed = translate('SongsPlugin.EditSongForm', 'Warning:' + ' Not all of the verses are in use.') + self.noVerseOrder = translate('SongsPlugin.EditSongForm', 'Warning:' + ' You have not entered a verse order.') def editSongDialogComboBox(parent, name): """ diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index d94df45fa..7593e4a95 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -349,6 +349,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason) # Hide or show the preview button. self.previewButton.setVisible(preview) + # Check if all verse tags are used. + self.onVerseOrderTextChanged(self.verseOrderEdit.text()) def tagRows(self): """ @@ -608,7 +610,12 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): for verse in verses: if not verse in order: verses_not_used.append(verse) - self.warningLabel.setVisible(len(verses_not_used) > 0 and bool(text)) + label_text = u'' + if not self.verseOrderEdit.text(): + label_text = self.noVerseOrder + elif verses_not_used: + label_text = self.notAlllVersesUsed + self.warningLabel.setText(label_text) def __extractVerseOrder(self, verse_order): order = []