← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/b1 into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/b1 into lp:openlp.

Requested reviews:
  Andreas Preikschat (googol-hush)
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/58947

Fix for Theme background display bug
Resolve first issue from comments.  Issue 2 is unconnected.
-- 
https://code.launchpad.net/~trb143/openlp/b1/+merge/58947
Your team OpenLP Core is subscribed to branch 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 10:29:22 +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 10:29:22 +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.temp_background_filename = u''
         self.updateThemeAllowed = False
         self.setDefaults()
         self.updateThemeAllowed = True
@@ -432,6 +434,16 @@
         # 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) and \
+                self.temp_background_filename == u'':
+                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 +601,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