fixed bug-969909 ('Missing verse tag' warning is not updated after adding a new verse

bzr-revno: 1920
Fixes: https://launchpad.net/bugs/969909
This commit is contained in:
Andreas Preikschat 2012-03-31 15:22:19 +02:00
commit 91ee39dd5e

View File

@ -489,6 +489,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.verseListWidget.setItem( self.verseListWidget.setItem(
self.verseListWidget.rowCount() - 1, 0, item) self.verseListWidget.rowCount() - 1, 0, item)
self.tagRows() self.tagRows()
# Check if all verse tags are used.
self.onVerseOrderTextChanged(self.verseOrderEdit.text())
def onVerseEditButtonClicked(self): def onVerseEditButtonClicked(self):
item = self.verseListWidget.currentItem() item = self.verseListWidget.currentItem()
@ -516,6 +518,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
item.setData(QtCore.Qt.UserRole, tempId[row]) item.setData(QtCore.Qt.UserRole, tempId[row])
self.verseListWidget.setItem(row, 0, item) self.verseListWidget.setItem(row, 0, item)
self.tagRows() self.tagRows()
# Check if all verse tags are used.
self.onVerseOrderTextChanged(self.verseOrderEdit.text())
def onVerseEditAllButtonClicked(self): def onVerseEditAllButtonClicked(self):
verse_list = u'' verse_list = u''
@ -575,6 +579,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.tagRows() self.tagRows()
self.verseEditButton.setEnabled(False) self.verseEditButton.setEnabled(False)
self.verseDeleteButton.setEnabled(False) self.verseDeleteButton.setEnabled(False)
# Check if all verse tags are used.
self.onVerseOrderTextChanged(self.verseOrderEdit.text())
def onVerseDeleteButtonClicked(self): def onVerseDeleteButtonClicked(self):
self.verseListWidget.removeRow(self.verseListWidget.currentRow()) self.verseListWidget.removeRow(self.verseListWidget.currentRow())