Basic verse counting

This commit is contained in:
Tim Bentley 2010-03-27 07:16:39 +00:00
parent 097a414c59
commit d2b56fc719

View File

@ -95,8 +95,10 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
def onAddVerse(self): def onAddVerse(self):
self.startNewLine() self.startNewLine()
self.VerseTextEdit.insertPlainText(u'---[%s:1]---\n' count = self.VerseTextEdit.toPlainText().\
% self.trUtf8('Verse')) count(u'---[%s' % self.trUtf8('Verse'))
self.VerseTextEdit.insertPlainText(u'---[%s:%s]---\n'
% (self.trUtf8('Verse'), count + 1))
self.VerseTextEdit.setFocus() self.VerseTextEdit.setFocus()
def setVerse(self, text, verseCount=0, single=False, tag=u'Verse:1'): def setVerse(self, text, verseCount=0, single=False, tag=u'Verse:1'):