From a4da4bae729a36efcc204cdcb4f90606edd0c426 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Mon, 21 Sep 2009 01:47:10 +0100 Subject: [PATCH] Fix song editor bugs - take 2 --- openlp/plugins/songs/forms/editsongform.py | 4 ---- openlp/plugins/songs/lib/models.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 3e5733444..94de8f768 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -431,10 +431,6 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): Receiver().send_message(u'load_song_list') self.close() - def closeEvent(self, event): - self.songmanager.session.rollback() - event.accept() - def processLyrics(self): log.debug(u'processLyrics') sxml = SongXMLBuilder() diff --git a/openlp/plugins/songs/lib/models.py b/openlp/plugins/songs/lib/models.py index d6237e922..350a09751 100644 --- a/openlp/plugins/songs/lib/models.py +++ b/openlp/plugins/songs/lib/models.py @@ -32,7 +32,7 @@ from openlp.plugins.songs.lib.classes import * def init_models(url): engine = create_engine(url) metadata.bind = engine - session = scoped_session(sessionmaker(autoflush=True, + session = scoped_session(sessionmaker(autoflush=False, autocommit=False, bind=engine)) mapper(Author, authors_table) mapper(Book, song_books_table)