diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 723869be..45c7e04e 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -1454,10 +1454,12 @@ namespace Volian.Print.Library { // The following lines were added for Comanche Peak ECA-TP-11-001A.SProcedure Steps.S17 (Printed as Step 12) if (spaceOnPage > 0 && myPara.YSize > fullPage && myPara.ChildrenRight != null && myPara.ChildrenRight.Count > 0 - && myPara.ChildrenRight[0].YSize <= fullPage && myPara.ChildrenRight[0].YSize > spaceOnPage) - // B2019-170: VCS page break causes printing of step on top of next page. Note that this bug fix for WCN - // was commented out. Harry Julian wanted this on 11/15/19. A new bug will be written for the WCN error. - //&& !myPara.MyItemInfo.IsHigh) // B2018-104: don't return if my parent is a high level - a top continue message was printing + && myPara.ChildrenRight[0].YSize <= fullPage && myPara.ChildrenRight[0].YSize > spaceOnPage + // B2018-104: don't return if my parent is a high level - a top continue message was printing + // Was not complete, i.e. caused other pagination problems and was put back in: B2019-170: VCS page break causes printing of step on top of next page. + // Note that this bug fix for WCN was commented out. Harry Julian wanted this on 11/15/19. A new bug will be written for the WCN error. + // B2019-173 reintroduced this line: + && !myPara.MyItemInfo.IsHigh) { //_MyLog.WarnFormat("\r\nMyParaBreak {0},{1},{2},{3},{4}", myPara, myPara.YSize, yUpperLimit, myPara.ChildrenRight[0].YSize, spaceOnPage); if (myPara != lastBreak) @@ -1467,12 +1469,17 @@ namespace Volian.Print.Library vlnParagraph myParent = myPara.MyParent; spaceOnPage = yAddForBtmMsg + yUpperLimit + myPara.YTop + yLocation - myParent.YTop; if (spaceOnPage > 0 && myParent != lastBreak && myParent.YSize > fullPage && myParent.ChildrenRight != null && myParent.ChildrenRight.Count > 0 - && myParent.ChildrenRight[0].YSize <= fullPage && myParent.ChildrenRight[0].YSize > spaceOnPage) - // B2019-170: VCS page break causes printing of step on top of next page. Note that this bug fix for WCN - // was commented out. Harry Julian wanted this on 11/15/19. A new bug will be written for the WCN error. - //&& !myParent.MyItemInfo.IsHigh) // B2018-104: don't return if my parent is a high level - a top continue message was printing + && myParent.ChildrenRight[0].YSize <= fullPage && myParent.ChildrenRight[0].YSize > spaceOnPage + // Was not complete, i.e. caused other pagination problems and was put back in: B2019-170: VCS page break causes printing of step on top of next page. + // Note that this bug fix for WCN was commented out. Harry Julian wanted this on 11/15/19. A new bug will be written for the WCN error. + // B2019-173 reintroduced the 'IsHigh' portion and added IsRNOPart, the HLS & RNOPart print at same location on page so code needs + // to account for either. + && (!myParent.MyItemInfo.IsHigh || myPara.MyItemInfo.IsRNOPart)) // B2018-104: don't return if my parent is a high level - a top continue message was printing { //_MyLog.WarnFormat("\r\nMyParentBreak {0},{1},{2},{3},{4}", myParent, myParent.YSize, yUpperLimit, myParent.ChildrenRight[0].YSize, spaceOnPage); + // B2019-173: make minPara2 the first step on next page + if (minPara2 != null && minPara2.MyParent == myParent && minPara2 != lastBreak) + return minPara2; if (myParent != lastBreak) return myParent; }