← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~googol-hush/openlp/fixes into lp:openlp

 

> Deleting 2 lines and combining them 16-18, 34 -43 and 290-292
Makes the code more readable...

> Adding loops to just find a duel bible (41-51) why?

if dual_bible:
    foo1()
elif has_dual_bible:
    foo2()
elif Verse_per_Slide:
    foo3()
elif Verse_per_Line:
    foo4()
else:
    foo5()

If we have a dual_bible then do foo1(). No matter what you have set you settings to (Line Per Verse...), the dual bibles will be displayed in a fixed way.

If we have combined bible verses then dual_bible is not always true (then, when we have a single verses). But "Continuous" does not like the way the dual bible verses are displayed (--> ItemCapabilities.NoLineBreaks; see 159-161), which means any single bible verse can be displayed if we are Continuous and have a dual bible verse in the item (has_dual_bible). That is why de do foo2().
However, we distinguish here again:
Continuous becomes 'Verse Per Line'
'Verse Per Line' stays 'Verse Per Line'
'Verse Per Slide' stays 'Verse Per Slide'
(see 116, 117, 118, 119, 141)

If we do not have any dual bible (has_dual_bible is False) we look if we have set 'Continuous', or ... and do foo3(), foo4() or foo5().

What I could to, is to move if dual_bible in the if had_dual_bible (since has_dual_bible must be True if dual_bible is True).

But you did say that to me anyway:

"Effectively you end up with 4 settings.

Duel
Verse per line
Verse per slide
Continuous."
-- 
https://code.launchpad.net/~googol-hush/openlp/fixes/+merge/34021
Your team OpenLP Core is subscribed to branch lp:openlp.



References