forked from openlp/openlp
commit
b01d6f7656
@ -98,7 +98,10 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
|||||||
match = self.verse_regex.match(text)
|
match = self.verse_regex.match(text)
|
||||||
if match:
|
if match:
|
||||||
verse_tag = match.group(1)
|
verse_tag = match.group(1)
|
||||||
|
try:
|
||||||
verse_num = int(match.group(2))
|
verse_num = int(match.group(2))
|
||||||
|
except ValueError:
|
||||||
|
verse_num = 1
|
||||||
verse_type_index = VerseType.from_loose_input(verse_tag)
|
verse_type_index = VerseType.from_loose_input(verse_tag)
|
||||||
if verse_type_index is not None:
|
if verse_type_index is not None:
|
||||||
self.verseNumberBox.setValue(verse_num)
|
self.verseNumberBox.setValue(verse_num)
|
||||||
@ -127,7 +130,10 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
|||||||
if match:
|
if match:
|
||||||
verse_type = match.group(1)
|
verse_type = match.group(1)
|
||||||
verse_type_index = VerseType.from_loose_input(verse_type)
|
verse_type_index = VerseType.from_loose_input(verse_type)
|
||||||
|
try:
|
||||||
verse_number = int(match.group(2))
|
verse_number = int(match.group(2))
|
||||||
|
except ValueError:
|
||||||
|
verse_number = 1
|
||||||
if verse_type_index is not None:
|
if verse_type_index is not None:
|
||||||
self.verseTypeComboBox.setCurrentIndex(verse_type_index)
|
self.verseTypeComboBox.setCurrentIndex(verse_type_index)
|
||||||
self.verseNumberBox.setValue(verse_number)
|
self.verseNumberBox.setValue(verse_number)
|
||||||
|
Loading…
Reference in New Issue
Block a user