Merge lp:~trb143/openlp/bugfixes1 into lp:openlp

Proposed by Tim Bentley
Status: Merged
Merged at revision: 1095
Proposed branch: lp:~trb143/openlp/bugfixes1
Merge into: lp:openlp
Diff against target: 34 lines (+10/-3)
2 files modified
openlp/core/ui/maindisplay.py (+3/-2)
openlp/core/ui/slidecontroller.py (+7/-1)
To merge this branch: bzr merge lp:~trb143/openlp/bugfixes1
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Review via email: mp+38644@code.launchpad.net

Description of the change

Path Optimization and bug fix

To post a comment you must log in.
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/ui/maindisplay.py'
2--- openlp/core/ui/maindisplay.py 2010-10-15 15:33:06 +0000
3+++ openlp/core/ui/maindisplay.py 2010-10-17 07:31:05 +0000
4@@ -231,8 +231,9 @@
5 The Image to be displayed can be QImage or QPixmap
6 """
7 log.debug(u'image to display')
8- image = resize_image(image, self.screen[u'size'].width(),
9- self.screen[u'size'].height())
10+ if not isinstance(image, QtGui.QImage):
11+ image = resize_image(image, self.screen[u'size'].width(),
12+ self.screen[u'size'].height())
13 self.resetVideo()
14 self.displayImage(image)
15 # show screen
16
17=== modified file 'openlp/core/ui/slidecontroller.py'
18--- openlp/core/ui/slidecontroller.py 2010-10-15 16:37:02 +0000
19+++ openlp/core/ui/slidecontroller.py 2010-10-17 07:31:05 +0000
20@@ -585,7 +585,13 @@
21 label = QtGui.QLabel()
22 label.setMargin(4)
23 label.setScaledContents(True)
24- label.setPixmap(QtGui.QPixmap.fromImage(frame[u'image']))
25+ if isinstance(frame[u'image'], QtGui.QImage):
26+ label.setPixmap(QtGui.QPixmap.fromImage(frame[u'image']))
27+ else:
28+ pixmap = resize_image(frame[u'image'],
29+ self.parent.RenderManager.width,
30+ self.parent.RenderManager.height)
31+ label.setPixmap(QtGui.QPixmap.fromImage(pixmap))
32 self.PreviewListWidget.setCellWidget(framenumber, 0, label)
33 slideHeight = width * self.parent.RenderManager.screen_ratio
34 row += 1