From f7ddb507e842bc66203c06d45826bc4c84552099 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Mon, 1 Nov 2010 19:33:33 +0000 Subject: [PATCH] Fix renderer --- openlp/core/lib/renderer.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 23d0623c5..2a8e46dca 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -116,18 +116,19 @@ class Renderer(object): 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'' 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'
'): + 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'
'): html_text = html_text[:len(html_text)-4] formatted.append(html_text) log.debug(u'format_slide - End')