More path optimisation

Fixes: https://launchpad.net/bugs/661965
This commit is contained in:
Tim Bentley 2010-10-17 08:26:14 +01:00
parent e70d4b6582
commit ca20598dde
2 changed files with 10 additions and 3 deletions

View File

@ -231,6 +231,7 @@ class MainDisplay(DisplayWidget):
The Image to be displayed can be QImage or QPixmap The Image to be displayed can be QImage or QPixmap
""" """
log.debug(u'image to display') log.debug(u'image to display')
if not isinstance(image, QtGui.QImage):
image = resize_image(image, self.screen[u'size'].width(), image = resize_image(image, self.screen[u'size'].width(),
self.screen[u'size'].height()) self.screen[u'size'].height())
self.resetVideo() self.resetVideo()

View File

@ -585,7 +585,13 @@ class SlideController(QtGui.QWidget):
label = QtGui.QLabel() label = QtGui.QLabel()
label.setMargin(4) label.setMargin(4)
label.setScaledContents(True) label.setScaledContents(True)
if isinstance(frame[u'image'], QtGui.QImage):
label.setPixmap(QtGui.QPixmap.fromImage(frame[u'image'])) label.setPixmap(QtGui.QPixmap.fromImage(frame[u'image']))
else:
pixmap = resize_image(frame[u'image'],
self.parent.RenderManager.width,
self.parent.RenderManager.height)
label.setPixmap(QtGui.QPixmap.fromImage(pixmap))
self.PreviewListWidget.setCellWidget(framenumber, 0, label) self.PreviewListWidget.setCellWidget(framenumber, 0, label)
slideHeight = width * self.parent.RenderManager.screen_ratio slideHeight = width * self.parent.RenderManager.screen_ratio
row += 1 row += 1