forked from openlp/openlp
Merge branch 'fix-pdf-from-servicemanager' into 'master'
Fix loading PDF items from the servicemanager See merge request openlp/openlp!175
This commit is contained in:
commit
c203de0b7a
@ -878,10 +878,10 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
|
|||||||
self.service_item = copy.copy(service_item)
|
self.service_item = copy.copy(service_item)
|
||||||
if self.service_item.is_command():
|
if self.service_item.is_command():
|
||||||
Registry().execute(
|
Registry().execute(
|
||||||
'{text}_start'.format(text=service_item.name.lower()),
|
'{text}_start'.format(text=self.service_item.name.lower()),
|
||||||
[self.service_item, self.is_live, self.hide_mode(), slide_no])
|
[self.service_item, self.is_live, self.hide_mode(), slide_no])
|
||||||
else:
|
else:
|
||||||
self._set_theme(service_item)
|
self._set_theme(self.service_item)
|
||||||
# Reset blanking if needed
|
# Reset blanking if needed
|
||||||
if old_item and self.is_live and (old_item.is_capable(ItemCapabilities.ProvidesOwnDisplay) or
|
if old_item and self.is_live and (old_item.is_capable(ItemCapabilities.ProvidesOwnDisplay) or
|
||||||
self.service_item.is_capable(ItemCapabilities.ProvidesOwnDisplay)):
|
self.service_item.is_capable(ItemCapabilities.ProvidesOwnDisplay)):
|
||||||
@ -893,10 +893,10 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
|
|||||||
row = 0
|
row = 0
|
||||||
width = self.main_window.control_splitter.sizes()[self.split]
|
width = self.main_window.control_splitter.sizes()[self.split]
|
||||||
if self.service_item.is_text():
|
if self.service_item.is_text():
|
||||||
self.preview_display.load_verses(service_item.rendered_slides)
|
self.preview_display.load_verses(self.service_item.rendered_slides)
|
||||||
self.preview_display.show()
|
self.preview_display.show()
|
||||||
for display in self.displays:
|
for display in self.displays:
|
||||||
display.load_verses(service_item.rendered_slides)
|
display.load_verses(self.service_item.rendered_slides)
|
||||||
# Replace the song menu so the verses match the song and are not cumulative
|
# Replace the song menu so the verses match the song and are not cumulative
|
||||||
if self.is_live:
|
if self.is_live:
|
||||||
self.toolbar.remove_widget('song_menu')
|
self.toolbar.remove_widget('song_menu')
|
||||||
@ -917,17 +917,17 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
|
|||||||
row += 1
|
row += 1
|
||||||
self.slide_list[str(row)] = row - 1
|
self.slide_list[str(row)] = row - 1
|
||||||
else:
|
else:
|
||||||
if service_item.is_image():
|
if self.service_item.is_image():
|
||||||
self.preview_display.load_images(service_item.slides)
|
self.preview_display.load_images(self.service_item.slides)
|
||||||
for display in self.displays:
|
for display in self.displays:
|
||||||
display.load_images(service_item.slides)
|
display.load_images(self.service_item.slides)
|
||||||
for slide_index, slide in enumerate(self.service_item.slides):
|
for slide_index, slide in enumerate(self.service_item.slides):
|
||||||
row += 1
|
row += 1
|
||||||
self.slide_list[str(row)] = row - 1
|
self.slide_list[str(row)] = row - 1
|
||||||
self.preview_widget.replace_service_item(self.service_item, width, slide_no)
|
self.preview_widget.replace_service_item(self.service_item, width, slide_no)
|
||||||
self.enable_tool_bar(self.service_item)
|
self.enable_tool_bar(self.service_item)
|
||||||
if self.service_item.is_media() or self.service_item.requires_media():
|
if self.service_item.is_media() or self.service_item.requires_media():
|
||||||
self._set_theme(service_item)
|
self._set_theme(self.service_item)
|
||||||
if self.service_item.is_command():
|
if self.service_item.is_command():
|
||||||
self.preview_display.load_verses(media_empty_song, True)
|
self.preview_display.load_verses(media_empty_song, True)
|
||||||
self.on_media_start(self.service_item)
|
self.on_media_start(self.service_item)
|
||||||
|
@ -342,7 +342,7 @@ class MessageListener(object):
|
|||||||
item.iconic_representation = item_cpy.icon
|
item.iconic_representation = item_cpy.icon
|
||||||
item.image_border = item_cpy.image_border
|
item.image_border = item_cpy.image_border
|
||||||
item.main = item_cpy.main
|
item.main = item_cpy.main
|
||||||
item.theme_data = item_cpy.theme_data
|
item.theme = item_cpy.theme
|
||||||
# When presenting PDF/XPS/OXPS, we are using the image presentation code,
|
# When presenting PDF/XPS/OXPS, we are using the image presentation code,
|
||||||
# so handler & processor is set to None, and we skip adding the handler.
|
# so handler & processor is set to None, and we skip adding the handler.
|
||||||
self.handler = None
|
self.handler = None
|
||||||
|
Loading…
Reference in New Issue
Block a user