← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~suutari-olli/openlp/click-slide-to-go-live-from-blank into lp:openlp

 

I commented on replace live item function and resetting the setting.

Diff comments:

> 
> === modified file 'openlp/core/ui/slidecontroller.py'
> --- openlp/core/ui/slidecontroller.py	2016-04-06 05:08:44 +0000
> +++ openlp/core/ui/slidecontroller.py	2016-04-20 16:13:53 +0000
> @@ -789,11 +789,16 @@
>      def replace_service_manager_item(self, item):
>          """
>          Replacement item following a remote edit
> +        This action  also takes place when a song that is sent to live from Service Manager is edited.
> +        If display is blanked, it will get unblanked if automatic unblanking is enabled. We prevent this from happening
> +        by setting a hidden setting to "True" and then to "False" after the processing is done.
>  
>          :param item: The current service item
>          """
>          if item == self.service_item:
> +            Settings().setValue('core/is live item edited and replaced', True)
>              self._process_item(item, self.preview_widget.current_slide_number())
> +            Settings().setValue('core/is live item edited and replaced', False)
>  

"What happens if OpenLP crashes before the flag has been set back?"

In this case unblanking display would get partly broken if "false" is never reached.

to avoid this from getting stuck to "True", we could add this to our boot up code:
Settings().setValue('core/is live item edited and replaced', False)

>      def add_service_manager_item(self, item, slide_no):
>          """


-- 
https://code.launchpad.net/~suutari-olli/openlp/click-slide-to-go-live-from-blank/+merge/292407
Your team OpenLP Core is subscribed to branch lp:openlp.


References