diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index d2652207c..b31ab5884 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -31,7 +31,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \ ItemCapabilities, SettingsManager, translate, check_item_selected, \ - check_directory_exists + check_directory_exists, Receiver from openlp.core.ui import criticalErrorMessageBox from openlp.core.utils import AppLocation, delete_file, get_images_filter @@ -187,12 +187,17 @@ class ImageMediaItem(MediaManagerItem): return False def onResetClick(self): + """ + Called to reset the Live backgound with the image selected, + """ self.resetAction.setVisible(False) self.parent.liveController.display.resetImage() + # Update the preview frame. + Receiver.send_message(u'maindisplay_active') def onReplaceClick(self): """ - Called to replace Live backgound with the video selected + Called to replace Live backgound with the image selected. """ if check_item_selected(self.listView, translate('ImagePlugin.MediaItem', @@ -204,6 +209,8 @@ class ImageMediaItem(MediaManagerItem): (path, name) = os.path.split(filename) self.parent.liveController.display.directImage(name, filename) self.resetAction.setVisible(True) + # Update the preview frame. + Receiver.send_message(u'maindisplay_active') else: criticalErrorMessageBox( translate('ImagePlugin.MediaItem', 'Live Background Error'), diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index 0280ba937..ba0a5dc96 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -30,7 +30,7 @@ import os from PyQt4 import QtCore, QtGui from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \ - ItemCapabilities, SettingsManager, translate, check_item_selected + ItemCapabilities, SettingsManager, translate, check_item_selected, Receiver from openlp.core.ui import criticalErrorMessageBox log = logging.getLogger(__name__) @@ -40,6 +40,7 @@ class MediaListView(BaseListWithDnD): self.PluginName = u'Media' BaseListWithDnD.__init__(self, parent) + class MediaMediaItem(MediaManagerItem): """ This is the custom media manager item for Media Slides. @@ -92,10 +93,18 @@ class MediaMediaItem(MediaManagerItem): self.resetAction.setVisible(False) def onResetClick(self): + """ + Called to reset the Live backgound with the media selected, + """ self.resetAction.setVisible(False) self.parent.liveController.display.resetVideo() + # Update the preview frame. + Receiver.send_message(u'maindisplay_active') def onReplaceClick(self): + """ + Called to replace Live backgound with the media selected. + """ if check_item_selected(self.listView, translate('MediaPlugin.MediaItem', 'You must select a media file to replace the background with.')): @@ -105,6 +114,8 @@ class MediaMediaItem(MediaManagerItem): (path, name) = os.path.split(filename) self.parent.liveController.display.video(filename, 0, True) self.resetAction.setVisible(True) + # Update the preview frame. + Receiver.send_message(u'maindisplay_active') else: criticalErrorMessageBox(translate('MediaPlugin.MediaItem', 'Live Background Error'),