StepLevel for AND substeps within a NOTE should be same level so that the ANDs stay together for pagination

Don’t paginate (page break) in the middle of a Note box
This commit is contained in:
2014-11-24 16:19:00 +00:00
parent d578f95922
commit f93f1059fb
2 changed files with 33 additions and 3 deletions

View File

@@ -835,7 +835,13 @@ namespace VEPROMS.CSLA.Library
level += item.ParentAndOrCount;
// First substep, this is where it uses the orphan logic from above.
if (!item.IsRNOPart && !item.IsHigh && item.MyPrevious == null)
// The check for the parent.IsNote was added for Calvert OI3/OI-1A, section 5, step H. This is a
// very long step with a very long note (multiple notes each having 1 or more ANDs). Without
// the addition of the parent.IsNote, the note was breaking between 2 ANDs (the 1st AND was a
// steplevel of 5, but the 2nd was a steplevel of 4). If something similar is seen with Cautions,
// that check could be added.
if (!item.IsRNOPart && !item.IsHigh && (item.MyPrevious == null || item.MyParent.IsNote))
level += firstInc;
else
firstInc = 0;