forked from openlp/openlp
Images can only loop if more than 1
This commit is contained in:
parent
0c9fcd0571
commit
af82682348
@ -98,12 +98,9 @@ class ServiceItem(object):
|
|||||||
self.frames = self.service_frames
|
self.frames = self.service_frames
|
||||||
self.service_frames = []
|
self.service_frames = []
|
||||||
elif self.service_item_type == ServiceType.Image:
|
elif self.service_item_type == ServiceType.Image:
|
||||||
#print "image"
|
|
||||||
#print self.service_frames
|
|
||||||
for slide in self.service_frames:
|
for slide in self.service_frames:
|
||||||
slide[u'image'] = self.RenderManager.resize_image(slide[u'image'])
|
slide[u'image'] = self.RenderManager.resize_image(slide[u'image'])
|
||||||
self.frames = self.service_frames
|
self.frames = self.service_frames
|
||||||
#self.service_frames = []
|
|
||||||
else:
|
else:
|
||||||
log.error(u'Invalid value renderer :%s' % self.service_item_type)
|
log.error(u'Invalid value renderer :%s' % self.service_item_type)
|
||||||
|
|
||||||
|
@ -137,9 +137,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
translate(u'SlideController', u'Stop continuous loop'),
|
translate(u'SlideController', u'Stop continuous loop'),
|
||||||
self.onStopLoop)
|
self.onStopLoop)
|
||||||
self.DelaySpinBox = QtGui.QSpinBox()
|
self.DelaySpinBox = QtGui.QSpinBox()
|
||||||
# self.SpinWidget = QtGui.QWidgetAction(self.Toolbar)
|
|
||||||
# self.SpinWidget.setDefaultWidget(self.DelaySpinBox)
|
|
||||||
# self.Toolbar.addAction(self.SpinWidget)
|
|
||||||
self.Toolbar.addToolbarWidget(u'Image SpinBox', self.DelaySpinBox)
|
self.Toolbar.addToolbarWidget(u'Image SpinBox', self.DelaySpinBox)
|
||||||
#self.DelaySpinBox.setValue(self.parent.parent.ImageTab.loop_delay)
|
#self.DelaySpinBox.setValue(self.parent.parent.ImageTab.loop_delay)
|
||||||
self.DelaySpinBox.setSuffix(translate(u'SlideController', u's'))
|
self.DelaySpinBox.setSuffix(translate(u'SlideController', u's'))
|
||||||
@ -184,8 +181,16 @@ class SlideController(QtGui.QWidget):
|
|||||||
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onSlideSelected)
|
QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onSlideSelected)
|
||||||
QtCore.QObject.connect(self.PreviewListWidget,
|
QtCore.QObject.connect(self.PreviewListWidget,
|
||||||
QtCore.SIGNAL(u'activated(QModelIndex)'), self.onSlideSelected)
|
QtCore.SIGNAL(u'activated(QModelIndex)'), self.onSlideSelected)
|
||||||
|
if isLive:
|
||||||
|
self.Toolbar.makeWidgetsInvisible(self.image_list)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
def enableToolBar(self, item):
|
def enableToolBar(self, item):
|
||||||
|
"""
|
||||||
|
Allows the toolbars to be reconfigured based on Controller Type
|
||||||
|
and ServiceItem Type
|
||||||
|
"""
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.enableLiveToolBar(item)
|
self.enableLiveToolBar(item)
|
||||||
else:
|
else:
|
||||||
@ -198,7 +203,11 @@ class SlideController(QtGui.QWidget):
|
|||||||
if item.service_item_type == ServiceType.Text:
|
if item.service_item_type == ServiceType.Text:
|
||||||
self.Toolbar.makeWidgetsInvisible(self.image_list)
|
self.Toolbar.makeWidgetsInvisible(self.image_list)
|
||||||
elif item.service_item_type == ServiceType.Image:
|
elif item.service_item_type == ServiceType.Image:
|
||||||
|
#Not sensible to allow loops with 1 frame
|
||||||
|
if len(item.frames) > 1:
|
||||||
self.Toolbar.makeWidgetsVisible(self.image_list)
|
self.Toolbar.makeWidgetsVisible(self.image_list)
|
||||||
|
else:
|
||||||
|
self.Toolbar.makeWidgetsInvisible(self.image_list)
|
||||||
|
|
||||||
def enablePreviewToolBar(self, item):
|
def enablePreviewToolBar(self, item):
|
||||||
"""
|
"""
|
||||||
@ -212,8 +221,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
request the correct the toolbar of the plugin
|
request the correct the toolbar of the plugin
|
||||||
Called by plugins
|
Called by plugins
|
||||||
"""
|
"""
|
||||||
self.enableToolBar(item)
|
|
||||||
item.render()
|
item.render()
|
||||||
|
self.enableToolBar(item)
|
||||||
self.displayServiceManagerItems(item, 0)
|
self.displayServiceManagerItems(item, 0)
|
||||||
|
|
||||||
def addServiceManagerItem(self, item, slideno):
|
def addServiceManagerItem(self, item, slideno):
|
||||||
|
Loading…
Reference in New Issue
Block a user