forked from openlp/openlp
Fix loading PDF items from the servicemanager
In slidecontroller::_process_item a copy was made of the serviceitem, but it wasen't always used, which caused issues since that item was converted from a presentation/command item to an image item for PDFs.
This commit is contained in:
parent
78aa6757fa
commit
3de2435631
@ -878,10 +878,10 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
|
||||
self.service_item = copy.copy(service_item)
|
||||
if self.service_item.is_command():
|
||||
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])
|
||||
else:
|
||||
self._set_theme(service_item)
|
||||
self._set_theme(self.service_item)
|
||||
# Reset blanking if needed
|
||||
if old_item and self.is_live and (old_item.is_capable(ItemCapabilities.ProvidesOwnDisplay) or
|
||||
self.service_item.is_capable(ItemCapabilities.ProvidesOwnDisplay)):
|
||||
@ -893,10 +893,10 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
|
||||
row = 0
|
||||
width = self.main_window.control_splitter.sizes()[self.split]
|
||||
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()
|
||||
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
|
||||
if self.is_live:
|
||||
self.toolbar.remove_widget('song_menu')
|
||||
@ -917,17 +917,17 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
|
||||
row += 1
|
||||
self.slide_list[str(row)] = row - 1
|
||||
else:
|
||||
if service_item.is_image():
|
||||
self.preview_display.load_images(service_item.slides)
|
||||
if self.service_item.is_image():
|
||||
self.preview_display.load_images(self.service_item.slides)
|
||||
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):
|
||||
row += 1
|
||||
self.slide_list[str(row)] = row - 1
|
||||
self.preview_widget.replace_service_item(self.service_item, width, slide_no)
|
||||
self.enable_tool_bar(self.service_item)
|
||||
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():
|
||||
self.preview_display.load_verses(media_empty_song, True)
|
||||
self.on_media_start(self.service_item)
|
||||
|
@ -342,7 +342,7 @@ class MessageListener(object):
|
||||
item.iconic_representation = item_cpy.icon
|
||||
item.image_border = item_cpy.image_border
|
||||
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,
|
||||
# so handler & processor is set to None, and we skip adding the handler.
|
||||
self.handler = None
|
||||
|
Loading…
Reference in New Issue
Block a user