forked from openlp/openlp
Song editing fix
This commit is contained in:
parent
7f1460cb4f
commit
4dd19eb643
@ -282,9 +282,21 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
def onVerseEditButtonClicked(self):
|
||||
item = self.VerseListWidget.currentItem()
|
||||
if item is not None:
|
||||
self.verse_form.setVerse(item.text())
|
||||
tempText = item.text()
|
||||
self.verse_form.setVerse(tempText)
|
||||
self.verse_form.exec_()
|
||||
item.setText(self.verse_form.getVerse())
|
||||
afterText = self.verse_form.getVerse()
|
||||
item.setText(afterText)
|
||||
#number of lines has change
|
||||
if len(tempText.split(u'\n')) != len(afterText.split(u'\n')):
|
||||
tempList = []
|
||||
for row in range(0, self.VerseListWidget.count()):
|
||||
tempList.insert(row, self.VerseListWidget.item(row))
|
||||
self.VerseListWidget.clear()
|
||||
for row in range (0, len(tempList)):
|
||||
item = tempList[row]
|
||||
self.VerseListWidget.addItem(item)
|
||||
self.VerseListWidget.repaint()
|
||||
self.VerseEditButton.setEnabled(False)
|
||||
self.VerseDeleteButton.setEnabled(False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user