forked from openlp/openlp
Theme values are preserved correctly
Fixes: https://launchpad.net/bugs/684901
This commit is contained in:
parent
22f52b74c1
commit
41dfd114d7
@ -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)
|
||||
|
@ -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 = \
|
||||
|
Loading…
Reference in New Issue
Block a user