forked from openlp/openlp
update preview frame, when using 'blank to screen/theme'; fixed bug when replacing live background when no item is live
This commit is contained in:
parent
b5ac73adaa
commit
4ff9157adf
@ -241,7 +241,10 @@ class MainDisplay(DisplayWidget):
|
||||
Used after Image plugin has changed the background
|
||||
"""
|
||||
log.debug(u'resetImage')
|
||||
if hasattr(self, u'serviceItem'):
|
||||
self.displayImage(self.serviceItem.bg_image_bytes)
|
||||
else:
|
||||
self.displayImage(None)
|
||||
# Update the preview frame.
|
||||
Receiver.send_message(u'maindisplay_active')
|
||||
|
||||
@ -343,11 +346,9 @@ class MainDisplay(DisplayWidget):
|
||||
Generates a preview of the image displayed.
|
||||
"""
|
||||
log.debug(u'preview for %s', self.isLive)
|
||||
# We must have a service item to preview
|
||||
if not hasattr(self, u'serviceItem'):
|
||||
return
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
if self.isLive:
|
||||
# We must have a service item to preview
|
||||
if self.isLive and hasattr(self, u'serviceItem'):
|
||||
# Wait for the fade to finish before geting the preview.
|
||||
# Important otherwise preview will have incorrect text if at all!
|
||||
if self.serviceItem.themedata and \
|
||||
@ -362,8 +363,7 @@ class MainDisplay(DisplayWidget):
|
||||
# if was hidden keep it hidden
|
||||
if self.isLive:
|
||||
self.setVisible(True)
|
||||
# if was hidden keep it hidden
|
||||
if self.hideMode and self.isLive:
|
||||
if self.hideMode:
|
||||
self.hideDisplay(self.hideMode)
|
||||
preview = QtGui.QImage(self.screen[u'size'].width(),
|
||||
self.screen[u'size'].height(),
|
||||
|
@ -783,6 +783,7 @@ class SlideController(QtGui.QWidget):
|
||||
QtCore.QSettings().remove(
|
||||
self.parent.generalSettingsSection + u'/screen blank')
|
||||
self.blankPlugin(checked)
|
||||
self.updatePreview()
|
||||
|
||||
def onThemeDisplay(self, checked):
|
||||
"""
|
||||
@ -804,6 +805,7 @@ class SlideController(QtGui.QWidget):
|
||||
QtCore.QSettings().remove(
|
||||
self.parent.generalSettingsSection + u'/screen blank')
|
||||
self.blankPlugin(checked)
|
||||
self.updatePreview()
|
||||
|
||||
def onHideDisplay(self, checked):
|
||||
"""
|
||||
@ -827,6 +829,7 @@ class SlideController(QtGui.QWidget):
|
||||
QtCore.QSettings().remove(
|
||||
self.parent.generalSettingsSection + u'/screen blank')
|
||||
self.hidePlugin(checked)
|
||||
self.updatePreview()
|
||||
|
||||
def blankPlugin(self, blank):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user