From 66d851887a40903c032b9bc7ae80dc3eb130a423 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 20 May 2011 11:01:48 +0100 Subject: [PATCH 1/2] Stop the media / presentation if going from Preview to Live Fixes: https://launchpad.net/bugs/780095 --- openlp/core/ui/slidecontroller.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index c298f897f..3456e8692 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -1050,7 +1050,15 @@ class SlideController(QtGui.QWidget): """ if QtCore.QSettings().value(u'advanced/double click live', QtCore.QVariant(False)).toBool(): - self.onGoLive() + # Live and Preview have issues if we have video or presentations + # playing in both at the same time. + if self.serviceItem.is_command(): + Receiver.send_message(u'%s_stop' % + self.serviceItem.name.lower(), + [self.serviceItem, self.isLive]) + if self.serviceItem.is_media(): + self.onMediaClose() + self.onGoLive() def onGoLive(self): """ From f09d64c1be453761df373fda3b880b79dcda37f4 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 20 May 2011 11:23:48 +0100 Subject: [PATCH 2/2] Fix extra indent --- openlp/core/ui/slidecontroller.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 3456e8692..f99779d38 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -1050,15 +1050,15 @@ class SlideController(QtGui.QWidget): """ if QtCore.QSettings().value(u'advanced/double click live', QtCore.QVariant(False)).toBool(): - # Live and Preview have issues if we have video or presentations - # playing in both at the same time. - if self.serviceItem.is_command(): - Receiver.send_message(u'%s_stop' % - self.serviceItem.name.lower(), - [self.serviceItem, self.isLive]) - if self.serviceItem.is_media(): - self.onMediaClose() - self.onGoLive() + # Live and Preview have issues if we have video or presentations + # playing in both at the same time. + if self.serviceItem.is_command(): + Receiver.send_message(u'%s_stop' % + self.serviceItem.name.lower(), + [self.serviceItem, self.isLive]) + if self.serviceItem.is_media(): + self.onMediaClose() + self.onGoLive() def onGoLive(self): """