From dabc04c7dd1250753f070c9bc6aac6630c25eb1b Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 25 Sep 2010 07:11:00 +0100 Subject: [PATCH] Fix replacement backgrounds --- openlp/core/ui/maindisplay.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index 3e49aaf92..f1ebda4e0 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -234,8 +234,11 @@ class MainDisplay(DisplayWidget): Display an image, as is. """ if image: - js = u'show_image("data:image/png;base64,%s");' % \ - image_to_byte(image) + if isinstance(image, QtGui.QImage): + js = u'show_image("data:image/png;base64,%s");' % \ + image_to_byte(image) + else: + js = u'show_image("data:image/png;base64,%s");' % image else: js = u'show_image("");' self.frame.evaluateJavaScript(js) @@ -246,7 +249,7 @@ class MainDisplay(DisplayWidget): Used after Image plugin has changed the background """ log.debug(u'resetImage') - self.displayImage(self.serviceItem.bg_frame) + self.displayImage(self.serviceItem.bg_image_bytes) def resetVideo(self): """