Make more things work

This commit is contained in:
Raoul Snyman 2018-04-11 09:07:24 -07:00
parent 1a744383e5
commit 6bee4ba21f

View File

@ -39,6 +39,7 @@ from openlp.core.lib import ItemCapabilities, ImageSource, ServiceItemAction, bu
from openlp.core.lib.ui import create_action from openlp.core.lib.ui import create_action
from openlp.core.ui import HideMode, DisplayControllerType from openlp.core.ui import HideMode, DisplayControllerType
from openlp.core.display.window import DisplayWindow from openlp.core.display.window import DisplayWindow
from openlp.core.display.render import render_tags
from openlp.core.widgets.layouts import AspectRatioLayout from openlp.core.widgets.layouts import AspectRatioLayout
from openlp.core.widgets.toolbar import OpenLPToolbar from openlp.core.widgets.toolbar import OpenLPToolbar
from openlp.core.widgets.views import ListPreviewWidget from openlp.core.widgets.views import ListPreviewWidget
@ -738,7 +739,10 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
theme_name = item.theme if item.theme else Registry().get('theme_manager').global_theme theme_name = item.theme if item.theme else Registry().get('theme_manager').global_theme
self.preview_display.set_theme(Registry().get('theme_manager').get_theme_data(theme_name)) self.preview_display.set_theme(Registry().get('theme_manager').get_theme_data(theme_name))
if item.is_text(): if item.is_text():
self.preview_display.load_verses(item.slides) slides = item.slides.copy()
for slide in slides:
slide['text'] = render_tags(slide['text'])
self.preview_display.load_verses(slides)
elif item.is_image(): elif item.is_image():
self.preview_display.load_images(item.slides) self.preview_display.load_images(item.slides)
slide_no = 0 slide_no = 0
@ -1163,11 +1167,9 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
self.slide_image.setDevicePixelRatio(self.main_window.devicePixelRatio()) self.slide_image.setDevicePixelRatio(self.main_window.devicePixelRatio())
self.slide_preview.setPixmap(self.slide_image) self.slide_preview.setPixmap(self.slide_image)
else: else:
print('Updating preview ... need to figure out what is supposed to happen here')
self.preview_display.go_to_slide(self.selected_row) self.preview_display.go_to_slide(self.selected_row)
# self.slide_image = self.display.preview() for display in self.displays:
# self.slide_image.setDevicePixelRatio(self.main_window.devicePixelRatio()) display.go_to_slide(self.selected_row)
# self.slide_preview.setPixmap(self.slide_image)
self.slide_count += 1 self.slide_count += 1
def grab_maindisplay(self): def grab_maindisplay(self):