Code review comment for lp:~richie-the-g/openlp/sec-global-option

Revision history for this message
Richard Graham (richie-the-g) wrote :

The potential issue with using a <br> is one I did consider. However, my tests with this concluded that although it seems like what you say (ie, a page with only the end character on) will happen, this is not the case. My general theme has a maximum of eight lines; when a ninth was added, the ninth was on a separate page (as expected). However, when the end character was added in this way, it was on its own ninth line. This code is in 'production' use at my church on Windows 7 and Windows 10 computers (dev'd on Win10), and the same behaviour is also what happens when running on Mac OSX.

This is potentially some unexpected behaviour in how OpenLP works, as logically it would seem as if this would break in the way you suggest. However, there is similar behaviour (dare I say a bug!) in Custom Slides where if you have a long paragraph with no line breaks that would overflow one page, the paragraph will continue to display even if it is outside the given frame within the page. I am assuming from my experimentation that when a page is generated, it first looks for manual breaks within the page (with the [---] or [===] tags depending on plugin), then line breaks in the text to decide to break at that point.

As the <br> before the end character happens right at the end of the page generation process, my understanding is that the frame dimensions at that point are ignored as the part of the code that deals with that has already been executed when splitting the item up into separate pages (the end character does not appear on the stage view whereas the semi-arbitrary breaks do).

I hope that made some sort of sense!

The blank line in the code I'll raise my hands to - left blank so while coding I could see where I added code to be able to know which was my broken code and which was the proper non-broken code! Removed in other instances; forgot to do it here!

The excuses and explanations out of the way (possibly in reverse order!), I'll look at the other bits and bobs when I get some downtime during the week ahead! Thank you for being patient with me!

« Back to merge proposal