openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #08264
[Merge] lp:~trb143/openlp/b1 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/b1 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #769988 in OpenLP: "Changing theme from image to gradient doesn't update preview"
https://bugs.launchpad.net/openlp/+bug/769988
For more details, see:
https://code.launchpad.net/~trb143/openlp/b1/+merge/58930
Fix for Theme background display bug
--
https://code.launchpad.net/~trb143/openlp/b1/+merge/58930
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/b1 into lp:openlp.
=== modified file 'openlp/core/lib/theme.py'
--- openlp/core/lib/theme.py 2011-04-15 21:43:59 +0000
+++ openlp/core/lib/theme.py 2011-04-25 07:20:55 +0000
@@ -637,4 +637,4 @@
self.font_footer_shadow_size)
self.add_display(self.display_horizontal_align,
self.display_vertical_align,
- self.display_slide_transition)
\ No newline at end of file
+ self.display_slide_transition)
=== modified file 'openlp/core/ui/themeform.py'
--- openlp/core/ui/themeform.py 2011-04-15 21:43:59 +0000
+++ openlp/core/ui/themeform.py 2011-04-25 07:20:55 +0000
@@ -56,6 +56,7 @@
self.setupUi(self)
self.registerFields()
self.updateThemeAllowed = True
+ self.temp_background_filename = u''
QtCore.QObject.connect(self.backgroundComboBox,
QtCore.SIGNAL(u'currentIndexChanged(int)'),
self.onBackgroundComboBoxCurrentIndexChanged)
@@ -279,6 +280,7 @@
Run the wizard.
"""
log.debug(u'Editing theme %s' % self.theme.theme_name)
+ self.theme.background_filename = u''
self.updateThemeAllowed = False
self.setDefaults()
self.updateThemeAllowed = True
@@ -432,6 +434,15 @@
# do not allow updates when screen is building for the first time.
if self.updateThemeAllowed:
self.theme.background_type = BackgroundType.to_string(index)
+ if self.theme.background_type != \
+ BackgroundType.to_string(BackgroundType.Image):
+ self.temp_background_filename = self.theme.background_filename
+ self.theme.background_filename = u''
+ if self.theme.background_type == \
+ BackgroundType.to_string(BackgroundType.Image) and \
+ self.temp_background_filename != u'':
+ self.theme.background_filename = self.temp_background_filename
+ self.temp_background_filename = u''
self.setBackgroundPageValues()
def onGradientComboBoxCurrentIndexChanged(self, index):
@@ -589,4 +600,4 @@
QtGui.QColor(field), self)
if new_color.isValid():
field = new_color.name()
- return field
\ No newline at end of file
+ return field
Follow ups