forked from openlp/openlp
Verse tagging verses must be in format of vX
This commit is contained in:
parent
1b6ad5814b
commit
547074d29a
@ -401,14 +401,24 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
if self.AuthorsListView.count() == 0:
|
||||
self.SongTabWidget.setCurrentIndex(2)
|
||||
self.AuthorsListView.setFocus()
|
||||
for verse in unicode(self.VerseOrderEdit.text()):
|
||||
if verse.isdigit() or u' BCITPEO'.find(verse.upper()) > -1:
|
||||
pass
|
||||
for verse in unicode(self.VerseOrderEdit.text()).split(u' '):
|
||||
if len(verse) == 2:
|
||||
if verse[0:1] == u'v' and verse[1:].isdigit():
|
||||
pass
|
||||
else:
|
||||
self.SongTabWidget.setCurrentIndex(0)
|
||||
self.VerseOrderEdit.setFocus()
|
||||
return False, \
|
||||
self.trUtf8('Invalid verse entry - vX')
|
||||
else:
|
||||
self.SongTabWidget.setCurrentIndex(0)
|
||||
self.VerseOrderEdit.setFocus()
|
||||
return False, \
|
||||
self.trUtf8('Invalid verse entry - values must be Numeric, I,B,C,T,P,E,O')
|
||||
if u' BCITPEO'.find(verse.upper()) > -1:
|
||||
pass
|
||||
else:
|
||||
self.SongTabWidget.setCurrentIndex(0)
|
||||
self.VerseOrderEdit.setFocus()
|
||||
return False, \
|
||||
self.trUtf8(\
|
||||
'Invalid verse entry - values must be Numeric, I,B,C,T,P,E,O')
|
||||
return True, u''
|
||||
|
||||
def onTitleEditItemLostFocus(self):
|
||||
|
@ -297,11 +297,11 @@ class SongMediaItem(MediaManagerItem):
|
||||
for verse in verseList:
|
||||
service_item.add_from_text(verse[1][:30], unicode(verse[1]))
|
||||
else:
|
||||
for order in service_item.verse_order:
|
||||
for order in service_item.verse_order.split(u' '):
|
||||
for verse in verseList:
|
||||
if verse[1]:
|
||||
if verse[0][u'type'] == "Verse" and \
|
||||
verse[0][u'label'][0] == order[0]:
|
||||
verse[0][u'label'][0] == order[1:]:
|
||||
verseTag = u'%s:%s' % \
|
||||
(verse[0][u'type'], verse[0][u'label'])
|
||||
service_item.add_from_text\
|
||||
|
Loading…
Reference in New Issue
Block a user