forked from openlp/openlp
Fix db committing too early (Bug #703073)
This commit is contained in:
parent
ecb97881a1
commit
6e2cc7ebff
@ -331,7 +331,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
else:
|
else:
|
||||||
author = Author.populate(first_name=text.rsplit(u' ', 1)[0],
|
author = Author.populate(first_name=text.rsplit(u' ', 1)[0],
|
||||||
last_name=text.rsplit(u' ', 1)[1], display_name=text)
|
last_name=text.rsplit(u' ', 1)[1], display_name=text)
|
||||||
self.manager.save_object(author)
|
self.manager.save_object(author, False)
|
||||||
author_item = QtGui.QListWidgetItem(
|
author_item = QtGui.QListWidgetItem(
|
||||||
unicode(author.display_name))
|
unicode(author.display_name))
|
||||||
author_item.setData(QtCore.Qt.UserRole,
|
author_item.setData(QtCore.Qt.UserRole,
|
||||||
@ -386,7 +386,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
|
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
|
||||||
QtGui.QMessageBox.Yes) == QtGui.QMessageBox.Yes:
|
QtGui.QMessageBox.Yes) == QtGui.QMessageBox.Yes:
|
||||||
topic = Topic.populate(name=text)
|
topic = Topic.populate(name=text)
|
||||||
self.manager.save_object(topic)
|
self.manager.save_object(topic, False)
|
||||||
topic_item = QtGui.QListWidgetItem(unicode(topic.name))
|
topic_item = QtGui.QListWidgetItem(unicode(topic.name))
|
||||||
topic_item.setData(QtCore.Qt.UserRole,
|
topic_item.setData(QtCore.Qt.UserRole,
|
||||||
QtCore.QVariant(topic.id))
|
QtCore.QVariant(topic.id))
|
||||||
@ -654,7 +654,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
"""
|
"""
|
||||||
Exit Dialog and save soong if valid
|
Exit Dialog and save song if valid
|
||||||
"""
|
"""
|
||||||
log.debug(u'accept')
|
log.debug(u'accept')
|
||||||
self.clearCaches()
|
self.clearCaches()
|
||||||
|
Loading…
Reference in New Issue
Block a user