Fixed Traceback if BookNameDialog was canceled while upgrading non webbibles

Replace LineEdit in BookNameDialog with Label
This commit is contained in:
Armin Köhler 2011-05-27 22:33:23 +02:00
parent 8eb261ee88
commit 010373b798
3 changed files with 6 additions and 6 deletions

View File

@ -606,7 +606,7 @@ class BibleUpgradeForm(OpenLPWizard):
int(verse[u'chapter']),
int(verse[u'verse']), unicode(verse[u'text']))
Receiver.send_message(u'openlp_process_events')
self.newbibles[number].session.commit()
self.newbibles[number].session.commit()
if not bible_failed:
self.incrementProgressBar(unicode(translate(
'BiblesPlugin.UpgradeWizardForm',

View File

@ -41,15 +41,15 @@ class Ui_BookNameDialog(object):
self.infoLabel.setObjectName(u'infoLabel')
self.bookNameLayout.addWidget(self.infoLabel)
self.correspondingLayout = QtGui.QGridLayout()
self.correspondingLayout.setColumnStretch(1, 1)
self.correspondingLayout.setSpacing(8)
self.correspondingLayout.setObjectName(u'correspondingLayout')
self.currentLabel = QtGui.QLabel(bookNameDialog)
self.currentLabel.setObjectName(u'currentLabel')
self.correspondingLayout.addWidget(self.currentLabel, 0, 0, 1, 1)
self.currentLineEdit = QtGui.QLineEdit(bookNameDialog)
self.currentLineEdit.setReadOnly(True)
self.currentLineEdit.setObjectName(u'currentLineEdit')
self.correspondingLayout.addWidget(self.currentLineEdit, 0, 1, 1, 1)
self.currentBookLabel = QtGui.QLabel(bookNameDialog)
self.currentBookLabel.setObjectName(u'currentBookLabel')
self.correspondingLayout.addWidget(self.currentBookLabel, 0, 1, 1, 1)
self.correspondingLabel = QtGui.QLabel(bookNameDialog)
self.correspondingLabel.setObjectName(u'correspondingLabel')
self.correspondingLayout.addWidget(

View File

@ -109,7 +109,7 @@ class BookNameForm(QDialog, Ui_BookNameDialog):
elif maxbooks <= 66:
self.apocryphaCheckBox.setCheckState(QtCore.Qt.Unchecked)
self.reloadComboBox()
self.currentLineEdit.setText(name)
self.currentBookLabel.setText(unicode(name))
self.correspondingComboBox.setFocus()
return QDialog.exec_(self)