forked from openlp/openlp
Fix up presentations
This commit is contained in:
parent
68fa2c4791
commit
8e1a7334d3
@ -232,7 +232,7 @@ class ServiceItem(object):
|
||||
"""
|
||||
self.service_item_type = ServiceItemType.Command
|
||||
self._raw_frames.append(
|
||||
{u'title': file_name, u'image': image, u'path': path})
|
||||
{u'title': file_name, u'image':image, u'path': path})
|
||||
self._new_item()
|
||||
|
||||
def get_service_repr(self):
|
||||
@ -378,8 +378,10 @@ class ServiceItem(object):
|
||||
"""
|
||||
if self.service_item_type == ServiceItemType.Text:
|
||||
return self._display_frames[row][u'html'].split(u'\n')[0]
|
||||
else:
|
||||
elif self.service_item_type == ServiceItemType.Image:
|
||||
return self._raw_frames[row][u'title']
|
||||
else:
|
||||
return self._raw_frames[row][u'image']
|
||||
|
||||
def get_frame_title(self, row=0):
|
||||
"""
|
||||
|
@ -227,7 +227,7 @@ class MainDisplay(DisplayWidget):
|
||||
|
||||
def directImage(self, name, path):
|
||||
"""
|
||||
API for replacement backgounds so Images are added directly to cache
|
||||
API for replacement backgrounds so Images are added directly to cache
|
||||
"""
|
||||
image = self.imageManager.add_image(name, path)
|
||||
self.image(name)
|
||||
|
@ -587,6 +587,11 @@ class SlideController(QtGui.QWidget):
|
||||
label = QtGui.QLabel()
|
||||
label.setMargin(4)
|
||||
label.setScaledContents(True)
|
||||
if self.serviceItem.is_command():
|
||||
image = resize_image(frame[u'image'],
|
||||
self.parent.RenderManager.width,
|
||||
self.parent.RenderManager.height)
|
||||
else:
|
||||
image = self.parent.RenderManager.image_manager. \
|
||||
get_image(frame[u'title'])
|
||||
label.setPixmap(QtGui.QPixmap.fromImage(image))
|
||||
|
Loading…
Reference in New Issue
Block a user