From 916987052026022eeed37fb6ce74fca17b300302 Mon Sep 17 00:00:00 2001 From: rimach Date: Sat, 20 Mar 2010 00:02:23 +0100 Subject: [PATCH] make Blank button workable --- openlp/core/ui/maindisplay.py | 11 ++++++++++- openlp/core/ui/slidecontroller.py | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index e59ce2060..f77d0a841 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -226,6 +226,7 @@ class MainDisplay(DisplayWidget): ``frame`` Image frame to be rendered """ + log.debug(u'frameView %d' % (self.displayBlank)) if not self.displayBlank: if transition: if self.frame is not None: @@ -248,14 +249,22 @@ class MainDisplay(DisplayWidget): if not self.isVisible(): self.setVisible(True) self.showFullScreen() + else: + self.waitingFrame = frame + self.waitingFrameTrans = transition def blankDisplay(self, blanked=True): + log.debug(u'Blank main Display %d' % blanked) if blanked: self.displayBlank = True self.display_text.setPixmap(QtGui.QPixmap.fromImage(self.blankFrame)) + self.waitingFrame = None + self.waitingFrameTrans = False else: self.displayBlank = False - if self.display_frame: + if self.waitingFrame: + self.frameView(self.waitingFrame, self.waitingFrameTrans) + elif self.display_frame: self.frameView(self.display_frame) def onMediaQueue(self, message): diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 0af64819a..08583cb54 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -524,6 +524,7 @@ class SlideController(QtGui.QWidget): """ Handle the blank screen button """ + log.debug(u'onBlankDisplay %d' % force) if force: self.blankButton.setChecked(True) self.blankScreen(self.blankButton.isChecked()) @@ -540,6 +541,8 @@ class SlideController(QtGui.QWidget): Receiver.send_message(u'%s_blank'% self.serviceItem.name.lower()) else: Receiver.send_message(u'%s_unblank'% self.serviceItem.name.lower()) + else: + self.parent.mainDisplay.blankDisplay(blanked) else: self.parent.mainDisplay.blankDisplay(blanked)