forked from openlp/openlp
- Reduced comments
- Removed unrequired reg_value from test.
This commit is contained in:
parent
39cbafd453
commit
4874f6a218
@ -488,7 +488,6 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties):
|
|||||||
'You must select one or more items to preview.'))
|
'You must select one or more items to preview.'))
|
||||||
else:
|
else:
|
||||||
log.debug('%s Preview requested' % self.plugin.name)
|
log.debug('%s Preview requested' % self.plugin.name)
|
||||||
# Reset the flag for: "has doubleclick added item to service" to False.
|
|
||||||
Registry().set_flag('has doubleclick added item to service', False)
|
Registry().set_flag('has doubleclick added item to service', False)
|
||||||
service_item = self.build_service_item()
|
service_item = self.build_service_item()
|
||||||
if service_item:
|
if service_item:
|
||||||
|
@ -800,9 +800,6 @@ class SlideController(DisplayController, RegistryProperties):
|
|||||||
"""
|
"""
|
||||||
Replacement item following a remote edit.
|
Replacement item following a remote edit.
|
||||||
This action also takes place when a song that is sent to live from Service Manager is edited.
|
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 flag to "True" and then to "False" after the processing is done.
|
|
||||||
The flag is also set to "False" on startup so display may be unblanked properly.
|
|
||||||
|
|
||||||
:param item: The current service item
|
:param item: The current service item
|
||||||
"""
|
"""
|
||||||
@ -979,8 +976,6 @@ class SlideController(DisplayController, RegistryProperties):
|
|||||||
def on_slide_unblank(self):
|
def on_slide_unblank(self):
|
||||||
"""
|
"""
|
||||||
Handle the slidecontroller unblank event.
|
Handle the slidecontroller unblank event.
|
||||||
If we are re-processing service item, don't unblank the display
|
|
||||||
(Found in def replace_service_manager_item)
|
|
||||||
"""
|
"""
|
||||||
if not Registry().get_flag('replace service manager item') is True:
|
if not Registry().get_flag('replace service manager item') is True:
|
||||||
self.on_blank_display(False)
|
self.on_blank_display(False)
|
||||||
|
@ -727,8 +727,7 @@ class TestSlideController(TestCase):
|
|||||||
slide_controller.on_preview_add_to_service = MagicMock()
|
slide_controller.on_preview_add_to_service = MagicMock()
|
||||||
slide_controller.media_reset = MagicMock()
|
slide_controller.media_reset = MagicMock()
|
||||||
Registry.create()
|
Registry.create()
|
||||||
reg_value = True
|
Registry().set_flag('has doubleclick added item to service', True)
|
||||||
Registry().set_flag('has doubleclick added item to service', reg_value)
|
|
||||||
|
|
||||||
# WHEN: on_preview_double_click is called
|
# WHEN: on_preview_double_click is called
|
||||||
slide_controller.on_preview_double_click()
|
slide_controller.on_preview_double_click()
|
||||||
@ -751,8 +750,7 @@ class TestSlideController(TestCase):
|
|||||||
slide_controller.on_preview_add_to_service = MagicMock()
|
slide_controller.on_preview_add_to_service = MagicMock()
|
||||||
slide_controller.media_reset = MagicMock()
|
slide_controller.media_reset = MagicMock()
|
||||||
Registry.create()
|
Registry.create()
|
||||||
reg_value = False
|
Registry().set_flag('has doubleclick added item to service', False)
|
||||||
Registry().set_flag('has doubleclick added item to service', reg_value)
|
|
||||||
|
|
||||||
# WHEN: on_preview_double_click is called
|
# WHEN: on_preview_double_click is called
|
||||||
slide_controller.on_preview_double_click()
|
slide_controller.on_preview_double_click()
|
||||||
|
Loading…
Reference in New Issue
Block a user