fix: set editverseform comboBox only for valid verse names

This commit is contained in:
M2j 2010-06-06 21:56:41 +02:00
parent fdd0fc713a
commit 761f30ec00

View File

@ -103,7 +103,9 @@ 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))
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,