B2019-173: fix pagination problems. (continuation of bug fix)

This commit is contained in:
Kathy Ruffing 2019-11-20 16:25:52 +00:00
parent 3f49024220
commit bfba372747

View File

@ -640,6 +640,16 @@ namespace Volian.Print.Library
ShowPageBreak(6, CheckForFirstCompression("HLS will have to split on next page"), "Special", YSize, yPageSizeNextPage, yWithinMargins, ManualPageBreak);
return 1;
}
// B2019-173: Pagination problem fix for VCS. Originally similar code was in FindPageBreak, but having code at the lower level caused the problem in VCS.
else if (MyPageHelper.ParaBreaks.Count > 0 && this.MyItemInfo.IsHigh
&& yWithinMargins > 0 && YSize > yPageSizeNextPage && ChildrenRight != null && ChildrenRight.Count > 0
&& ChildrenRight[0].YSize <= yPageSizeNextPage && ChildrenRight[0].YSize > yWithinMargins)
{
MyPageHelper.ParaBreaks.Clear();
BuildPageBreakList(yPageSize + yExtra, yPageSizeNextPage + yExtra2, KeepStepsOnPage, yEndMsg, doSectionTitleContinued & SectionShowTitles, true); // Case 1 :Works for ES05 Step 15 SubStep 7
ShowPageBreak(6, CheckForFirstCompression("HLS with RNO will have to split on next page"), "Special", YSize, yPageSizeNextPage, yWithinMargins, ManualPageBreak);
return 1;
}
return 0; // Stay on this page
}
@ -1473,13 +1483,17 @@ namespace Volian.Print.Library
// 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
// to account for either. second iteration of this fix removed IsRNOPart (see code in Paginate)
&& !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;
// Removed the following and moved logic to Paginate method for the second iteration of the bug fix. This code below AND the IsRNOPart above caused another
// pagination problem. The insert and subsequent removal of this code are both done under bug B22019-173.
// Initial code for B2019-173: make minPara2 the first step on next page
//if (minPara2 != null && minPara2.MyParent == myParent && minPara2 != lastBreak && minPara2.MyItemInfo.Ordinal == 1)
//{
// return minPara2;
//}
if (myParent != lastBreak)
return myParent;
}