From 08a58844c6aead18167af2aa4d579dada9e7629b Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 13 May 2017 09:37:38 +0100 Subject: [PATCH] fix editing theme load and save --- openlp/core/ui/thememanager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index c02be62e2..d6d05d1bb 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -513,11 +513,12 @@ class ThemeManager(OpenLPMixin, RegistryMixin, QtWidgets.QWidget, Ui_ThemeManage """ self.log_debug('get theme data for theme {name}'.format(name=theme_name)) theme_file = os.path.join(self.path, str(theme_name), str(theme_name) + '.json') - jsn = True - if not theme_file: - theme_file = os.path.join(self.path, str(theme_name), str(theme_name) + '.xml') - jsn = False theme_data = get_text_file_string(theme_file) + jsn = True + if not theme_data: + theme_file = os.path.join(self.path, str(theme_name), str(theme_name) + '.xml') + theme_data = get_text_file_string(theme_file) + jsn = False if not theme_data: self.log_debug('No theme data - using default theme') return Theme()