From d5f1c54669f491d44414dd7744ea3ace940e5716 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 27 May 2012 12:58:10 +0200 Subject: [PATCH] do some of the clean ups even when we just imported settings --- openlp/core/ui/mainwindow.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index c36138941..85c5d6838 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -1185,22 +1185,23 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): self.imageManager.stop_manager = True while self.imageManager.imageThread.isRunning(): time.sleep(0.1) + # Clean temporary files used by services + self.serviceManagerContents.cleanUp() if save_settings: - # Clean temporary files used by services - self.serviceManagerContents.cleanUp() if QtCore.QSettings().value(u'advanced/save current plugin', QtCore.QVariant(False)).toBool(): QtCore.QSettings().setValue(u'advanced/current media plugin', QtCore.QVariant(self.mediaToolBox.currentIndex())) - # Call the cleanup method to shutdown plugins. - log.info(u'cleanup plugins') - self.pluginManager.finalise_plugins() + # Call the cleanup method to shutdown plugins. + log.info(u'cleanup plugins') + self.pluginManager.finalise_plugins() + if save_settings: # Save settings self.saveSettings() - # Close down the display - if self.liveController.display: - self.liveController.display.close() - self.liveController.display = None + # Close down the display + if self.liveController.display: + self.liveController.display.close() + self.liveController.display = None def serviceChanged(self, reset=False, serviceName=None): """