From edc46f2967755d6b5879e116cf86e196d63d0235 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 9 Feb 2010 16:09:57 +0000 Subject: [PATCH] Fix songs so tagging can work > 10 verses. Tested with 100! --- openlp/core/ui/slidecontroller.py | 2 +- openlp/plugins/songs/forms/editsongform.py | 2 +- openlp/plugins/songs/lib/mediaitem.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 8a4aebd8c..e88699b71 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -444,7 +444,7 @@ class SlideController(QtGui.QWidget): tag = None #If verse handle verse number else tag only if bits[0] == self.trUtf8('Verse'): - tag = u'%s%s' % (bits[0][0], bits[1][0] ) + tag = u'%s%s' % (bits[0][0], bits[1][0:] ) else: tag = bits[0] try: diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index e06551631..477910108 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -410,7 +410,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): self.AuthorsListView.setFocus() #split the verse list by space and mark lower case for testing for verse in unicode(self.VerseOrderEdit.text()).lower().split(u' '): - if len(verse) == 2: + if len(verse) > 1: if verse[0:1] == u'v' and verse[1:].isdigit(): pass else: diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index f5fe0686b..7398fe18d 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -310,7 +310,7 @@ class SongMediaItem(MediaManagerItem): for verse in verseList: if verse[1]: if verse[0][u'type'] == "Verse": - if verse[0][u'label'][0] == order[1:]: + if verse[0][u'label'] == order[1:]: verseTag = u'%s:%s' % \ (verse[0][u'type'], verse[0][u'label']) service_item.add_from_text\