From 31ede5556d986c04ade310808082517b28b33d5b Mon Sep 17 00:00:00 2001 From: suutari-olli Date: Wed, 27 Apr 2016 23:38:46 +0300 Subject: [PATCH] Added this to program startup code, should replace_service_manager_item ever crash the program. Settings().setValue('core/is live item edited and replaced', False) --- openlp/core/ui/mainwindow.py | 3 +++ openlp/core/ui/slidecontroller.py | 1 + 2 files changed, 4 insertions(+) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 228969ad1..1640cd202 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -652,6 +652,9 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, RegistryProperties): """ Give all the plugins a chance to perform some tasks at startup """ + # This setting is set to false, in case def replace_service_manager_item in slidecontroller would crash the + # program and make blank to modes unavailable. + Settings().setValue('core/is live item edited and replaced', False) self.application.process_events() for plugin in self.plugin_manager.plugins: if plugin.is_active(): diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 4d11381b1..67cece409 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -792,6 +792,7 @@ class SlideController(DisplayController, RegistryProperties): This action also takes place when a song that is sent to live from Service Manager is edited. If display is blanked, it will get unblanked if automatic unblanking is enabled. We prevent this from happening by setting a hidden setting to "True" and then to "False" after the processing is done. + The setting is also set to "False" on every start up, should the program ever crash during this process. :param item: The current service item """