From 761f30ec003d51a0b338f88f66d70a1ab97bea15 Mon Sep 17 00:00:00 2001 From: M2j Date: Sun, 6 Jun 2010 21:56:41 +0200 Subject: [PATCH] fix: set editverseform comboBox only for valid verse names --- openlp/plugins/songs/forms/editverseform.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index eb74cfd84..9033267cd 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -103,8 +103,10 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): if match: verse_type = match.group(1) verse_number = int(match.group(2)) - self.VerseTypeComboBox.setCurrentIndex(VerseType.from_string(verse_type)) - self.VerseNumberBox.setValue(verse_number) + verse_type_index = VerseType.from_string(verse_type) + if verse_type_index: + self.VerseTypeComboBox.setCurrentIndex(verse_type_index) + self.VerseNumberBox.setValue(verse_number) def setVerse(self, text, single=False, tag=u'%s:1' % VerseType.to_string(VerseType.Verse)):