← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/bug-1296104-2.0 into lp:openlp/2.0

 

Andreas Preikschat has proposed merging lp:~googol/openlp/bug-1296104-2.0 into lp:openlp/2.0.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1296104 in OpenLP: "Renderer broken when two option breaks next to each other"
  https://bugs.launchpad.net/openlp/+bug/1296104

For more details, see:
https://code.launchpad.net/~googol/openlp/bug-1296104-2.0/+merge/212291

Hello,

fixed bug #1296104 (Renderer broken when two option breaks next to each other)
-- 
https://code.launchpad.net/~googol/openlp/bug-1296104-2.0/+merge/212291
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/bug-1296104-2.0 into lp:openlp/2.0.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py	2014-01-14 19:25:18 +0000
+++ openlp/core/lib/renderer.py	2014-03-22 18:04:43 +0000
@@ -284,6 +284,9 @@
         elif item.is_capable(ItemCapabilities.CanSoftBreak):
             pages = []
             if u'[---]' in text:
+                # Remove two or more option slide breaks next to each other (causing infinite loop).
+                while u'\n[---]\n[---]\n' in text:
+                        text = text.replace(u'\n[---]\n[---]\n', u'\n[---]\n')
                 while True:
                     slides = text.split(u'\n[---]\n', 2)
                     # If there are (at least) two occurrences of [---] we use


Follow ups