forked from openlp/openlp
render improvments part 2
This commit is contained in:
parent
9f6caa5426
commit
1074f4b98f
@ -95,11 +95,15 @@ class ServiceItem(object):
|
||||
self.RenderManager.set_override_theme(None)
|
||||
else:
|
||||
self.RenderManager.set_override_theme(self.theme)
|
||||
firstTime = True
|
||||
for slide in self.service_frames:
|
||||
formated = self.RenderManager.format_slide(slide[u'raw_slide'])
|
||||
for format in formated:
|
||||
frame = self.RenderManager.generate_slide(format,
|
||||
self.raw_footer)
|
||||
frame = None
|
||||
if firstTime:
|
||||
frame = self.RenderManager.generate_slide(format,
|
||||
self.raw_footer)
|
||||
firstTime = False
|
||||
lines = u''
|
||||
for line in format:
|
||||
lines += line + u'\n'
|
||||
@ -115,6 +119,12 @@ class ServiceItem(object):
|
||||
else:
|
||||
log.error(u'Invalid value renderer :%s' % self.service_item_type)
|
||||
|
||||
def render_individual(self, row):
|
||||
format = self.frames[row][u'text'].split(u'\n')
|
||||
frame = self.RenderManager.generate_slide(format,
|
||||
self.raw_footer)
|
||||
return frame
|
||||
|
||||
def add_from_image(self, path, frame_title, image):
|
||||
"""
|
||||
Add an image slide to the service item.
|
||||
|
@ -337,6 +337,8 @@ class SlideController(QtGui.QWidget):
|
||||
if row > -1 and row < self.PreviewListWidget.rowCount():
|
||||
label = self.PreviewListWidget.cellWidget(row, 0)
|
||||
frame = self.serviceitem.frames[row][u'image']
|
||||
if frame == None:
|
||||
frame = self.serviceitem.render_individual(row)
|
||||
self.SlidePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
||||
if self.isLive:
|
||||
self.parent.mainDisplay.frameView(frame)
|
||||
|
Loading…
Reference in New Issue
Block a user