From bec051a50293a34086a4982805678047ccf12e2a Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 6 Aug 2010 17:38:52 +0100 Subject: [PATCH] Fade previews now work --- openlp/core/lib/htmlbuilder.py | 8 ++------ openlp/core/ui/maindisplay.py | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 67c7a2eb8..cf130854c 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -46,7 +46,6 @@ HTMLSRC = u""" diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index ae1319d75..720e3c07d 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -164,7 +164,6 @@ class MainDisplay(DisplayWidget): log.debug(u'text') self.frame.evaluateJavaScript("startfade('" + slide.replace("\\", "\\\\").replace("\'", "\\\'") + "')") - print self.frame.evaluateJavaScript("fadeFinished()").toString() return self.preview() def alert(self, text): @@ -270,6 +269,8 @@ class MainDisplay(DisplayWidget): log.debug(u'preview') # Wait for the webview to update before geting the preview. # Important otherwise first preview will miss the background ! + while self.frame.evaluateJavaScript("fadeFinished()").toString() == u'false': + Receiver.send_message(u'openlp_process_events') while not self.loaded: Receiver.send_message(u'openlp_process_events') preview = QtGui.QImage(self.screen[u'size'].width(),