diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index 757cd775f..7ba77719d 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -162,6 +162,7 @@ class Settings(QtCore.QSettings): 'core/display on monitor': True, 'core/override position': False, 'core/application version': '0.0', + 'core/doubleclicking preview has added to service': False, 'images/background color': '#000000', 'media/players': 'system,webkit', 'media/override player': QtCore.Qt.Unchecked, diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 04df1d38a..c53583e06 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -481,6 +481,9 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties): 'You must select one or more items to preview.')) else: log.debug('%s Preview requested' % self.plugin.name) + # If ('advanced/double click live') is not enabled, double clicking preview adds the item to Service. + # This setting prevents it from being sent to Service multiple times, in here it is reset to False. + Settings().setValue('core/doubleclicking preview has added to service', False) service_item = self.build_service_item() if service_item: service_item.from_plugin = True diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index c6699cedd..c06506795 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -1371,10 +1371,13 @@ class SlideController(DisplayController, RegistryProperties): Registry().execute('%s_stop' % self.service_item.name.lower(), [self.service_item, self.is_live]) if self.service_item.is_media(): self.on_media_close() - if Settings().value('core/auto unblank'): - self.on_go_live() - else: + self.on_go_live() + # If ('advanced/double click live') is not enabled, double clicking preview adds the item to Service. + # Prevent same item in preview from being sent to Service multiple times. Changing preview slide resets + # this setting. Do note that this still allows to add item to Service multiple times if icon is clicked. + elif not Settings().value('core/doubleclicking preview has added to service'): self.on_preview_add_to_service() + Settings().setValue('core/doubleclicking preview has added to service', True) def on_go_live(self, field=None): """