B2020-032 logic to try to put the parent of a Table step type on the same page as the table if paginating on the table. Put in for Barakah EOPs 1T4-OP-EOP-XX-0100 Attachment 32

This commit is contained in:
John Jenko 2020-03-10 19:20:11 +00:00
parent 975db3f56d
commit 166e2e04f2

View File

@ -1005,6 +1005,16 @@ namespace Volian.Print.Library
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter - yAccountForBottomMsg, yLowerLimit,
myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
myBottomMsgSpace, MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
// B2020-032 put in for Barakah EOPs 1T4-OP-EOP-XX-0100 Attachement 32 step 1.2.2a where a table was printing on a page by itself.
// The following logic will walk up to each parent level to see try and get as many parent step levels on the same page
// as the Table.
if (paraBreak.MyItemInfo.IsTable && paraBreak.MyParent.YSize < (yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace))
{
vlnParagraph tparent = paraBreak.MyParent;
while (!tparent.MyItemInfo.IsHigh && tparent.MyParent.YSize < (yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace))
tparent = tparent.MyParent;
paraBreak = tparent;
}
// B2017-109: for supplemental information, if there is a preferred page break, account for it.
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
// Break after table if it's the only item left and there is enough space
@ -1571,7 +1581,6 @@ namespace Volian.Print.Library
if (StepWillFitOnBlankPageButNotOnCurrentPage(myPara, yLocation, yStart, fullPage))
if (myPara != lastBreak)
return myPara;
// If this item will not fit on the current page, put a page break
if (myPara.YBottom - myPara.YTop > (yUpperLimit + yLocation))
if (myPara != lastBreak)