forked from openlp/openlp
make blank button workable
This commit is contained in:
parent
5170ad1607
commit
bc50765e3a
@ -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):
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user