diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 542e4e723..ae893ead1 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -318,7 +318,6 @@ class ThemeXML(object): ``shadow_size`` How big the Shadow is - """ background = self.theme_xml.createElement(u'font') background.setAttribute(u'type', fonttype) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index aa1780836..ba439c5b1 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -55,6 +55,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.setupUi(self) self.registerFields() self.accepted = False + self.updateThemeAllowed = True QtCore.QObject.connect(self.backgroundTypeComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), self.onBackgroundComboBox) @@ -164,8 +165,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): u'background_image', self.imageLineEdit) self.backgroundPage.registerField( u'gradient', self.gradientComboBox) - self.mainAreaPage.registerField( - u'mainFontComboBox', self.mainFontComboBox) self.mainAreaPage.registerField( u'mainColorPushButton', self.mainColorPushButton) self.mainAreaPage.registerField( @@ -285,7 +284,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): """ Run the wizard. """ + self.updateThemeAllowed = False self.setDefaults() + self.updateThemeAllowed = True return QtGui.QWizard.exec_(self) def initializePage(self, id): @@ -526,11 +527,11 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.theme.background_filename = unicode(filename) self.setBackgroundTabValues() - def onMainFontComboBox(self): - """ - Main Font Combo box changed - """ - self.theme.font_main_name = self.mainFontComboBox.currentFont().family() +# def onMainFontComboBox(self): +# """ +# Main Font Combo box changed +# """ +# self.theme.font_main_name = self.mainFontComboBox.currentFont().family() def onMainColourPushButtonClicked(self): self.theme.font_main_color = \ @@ -557,6 +558,8 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): Update the theme object from the UI for fields not already updated when the are changed. """ + if not self.updateThemeAllowed: + return log.debug(u'updateTheme') # main page self.theme.font_main_name = \