openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04393
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Fix renderer so page ends work correctly
Fix image previews so they do not crash.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/39994
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2010-10-23 07:23:49 +0000
+++ openlp/core/lib/renderer.py 2010-11-03 17:39:47 +0000
@@ -116,18 +116,19 @@
html_text = u''
styled_text = u''
for line in text:
- styled_line = expand_tags(line)
- if styled_text:
- styled_text += line_end + styled_line
+ styled_line = expand_tags(line) + line_end
+ styled_text += styled_line
html = self.page_shell + styled_text + u'</div></body></html>'
self.web.setHtml(html)
# Text too long so go to next page
if self.web_frame.contentsSize().height() > self.page_height:
+ if html_text.endswith(u'<br>'):
+ html_text = html_text[:len(html_text)-4]
formatted.append(html_text)
html_text = u''
styled_text = styled_line
html_text += line + line_end
- if line_break:
+ if html_text.endswith(u'<br>'):
html_text = html_text[:len(html_text)-4]
formatted.append(html_text)
log.debug(u'format_slide - End')
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2010-10-29 16:08:31 +0000
+++ openlp/core/ui/slidecontroller.py 2010-11-03 17:39:47 +0000
@@ -794,9 +794,10 @@
row = self.PreviewListWidget.currentRow()
self.selectedRow = 0
if row > -1 and row < self.PreviewListWidget.rowCount():
- if self.serviceItem.is_command() and self.isLive:
- Receiver.send_message(u'%s_slide' % self.serviceItem.name.lower(),
- [self.serviceItem, self.isLive, row])
+ if self.serviceItem.is_command():
+ if self.isLive:
+ Receiver.send_message(u'%s_slide' % self.serviceItem.name.lower(),
+ [self.serviceItem, self.isLive, row])
self.updatePreview()
else:
toDisplay = self.serviceItem.get_rendered_frame(row)
Follow ups