F2024-006 Fixed pagination logic to that step text at the bottom of an Alarm Point page does not print on top of the bottom continue message #210

Merged
djankowski merged 1 commits from Vogtle3&4 into Development 2024-01-24 08:40:58 -05:00
2 changed files with 26 additions and 9 deletions

View File

@ -569,9 +569,22 @@ namespace Volian.Print.Library
KeepStepsOnPage = false; KeepStepsOnPage = false;
} }
} }
// B2023-116: Vogtle alarm pagination - sub-steps are separating from their HLS even if there is room for some (not all). See comment above for setting of if (KeepStepsOnPage && ySizeIncludingFirst > (yWithinMargins - ySizeBtmCtnMess1 - ySizeBtmEndMess1))
// 'alarmPageKeepHighWithSubs'. {
if (KeepStepsOnPage && !alarmPageKeepHighWithSubs && ySizeIncludingFirst > (yWithinMargins - ySizeBtmCtnMess1 - ySizeBtmEndMess1)) KeepStepsOnPage = false; // B2023-116: Vogtle alarm pagination - sub-steps are separating from their HLS even if there is room for some (not all).
// See comment above for setting of 'alarmPageKeepHighWithSubs'.
if (alarmPageKeepHighWithSubs)
{
// F2024-006: Vogtle Alarms pagination - compare the size of the step and its first sub-step with what we think we have left on the
// page. if not enough room with a continue message then set KeepStepsOnPage to start this step on its own page.
// This solved an issue where the last line of step text was printing on top of the bottom continue message
float myFirstPieceSize = GetFirstPieceSize(true);
if (myFirstPieceSize > yWithinMargins)
KeepStepsOnPage = false;
}
else
KeepStepsOnPage = false;
}
if (!KeepWithHeader && !KeepStepsOnPage && mySize - SixLinesPerInch + yEndMsg - tableSpaceAvailable <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break if (!KeepWithHeader && !KeepStepsOnPage && mySize - SixLinesPerInch + yEndMsg - tableSpaceAvailable <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break
{ {
// Don't want extra line before step // Don't want extra line before step

View File

@ -3314,9 +3314,11 @@ namespace Volian.Print.Library
/// This gets the height of the step with it's Caution's, Notes and potentially any First Substeps /// This gets the height of the step with it's Caution's, Notes and potentially any First Substeps
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private float GetFirstPieceSize() // F2024-006: Vogtle Alarms pagination - added 'includeFirstSub' to get that size of the first substep with the parent step
// to help determine pagination
private float GetFirstPieceSize(bool includeFirstSub = false)
{ {
vlnParagraph paraLast = GetFirstPieceLastPart(); vlnParagraph paraLast = GetFirstPieceLastPart(includeFirstSub);
float retval = (paraLast.YBottom) - YTopMost; float retval = (paraLast.YBottom) - YTopMost;
//Console.WriteLine(MyItemInfo.DBSequence); //Console.WriteLine(MyItemInfo.DBSequence);
return retval; return retval;
@ -3370,10 +3372,12 @@ namespace Volian.Print.Library
get { return _YBottomForBox; } get { return _YBottomForBox; }
set { _YBottomForBox = value; } set { _YBottomForBox = value; }
} }
private vlnParagraph GetFirstPieceLastPart() // F2024-006: Vogtle Alarms pagination - added 'includeFirstSub' to get that size of the first substep with the parent step
// to help determine pagination - even when PaginateOnFirstSubstep is turned on
private vlnParagraph GetFirstPieceLastPart(bool includeFirstSub = false)
{ {
vlnParagraph para = this; vlnParagraph para = this;
if (!MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PaginateOnFirstSubstep && ChildrenBelow != null && ChildrenBelow.Count > 0) if ((!MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PaginateOnFirstSubstep || includeFirstSub) && ChildrenBelow != null && ChildrenBelow.Count > 0)
{ {
// If the substep has a separator (OR, AND) then return the last substep rather than the first. // If the substep has a separator (OR, AND) then return the last substep rather than the first.
string mySep = ChildrenBelow[0].MyItemInfo.FormatStepData.Sep ?? "{Null}"; string mySep = ChildrenBelow[0].MyItemInfo.FormatStepData.Sep ?? "{Null}";
@ -3386,14 +3390,14 @@ namespace Volian.Print.Library
if (keepEqListTogether && !ChildrenBelow[0].MyItemInfo.IsSequential && !this.MyItemInfo.IsHigh) // Extend to the last Item. if (keepEqListTogether && !ChildrenBelow[0].MyItemInfo.IsSequential && !this.MyItemInfo.IsHigh) // Extend to the last Item.
para = ChildrenBelow[ChildrenBelow.Count - 1].GetFirstPieceLastPart(); para = ChildrenBelow[ChildrenBelow.Count - 1].GetFirstPieceLastPart();
else else
para = ChildrenBelow[0].GetFirstPieceLastPart(); para = ChildrenBelow[0].GetFirstPieceLastPart(includeFirstSub);
} }
} }
if (ChildrenRight != null && ChildrenRight.Count > 0) if (ChildrenRight != null && ChildrenRight.Count > 0)
{ {
foreach (vlnParagraph paraRight in ChildrenRight) foreach (vlnParagraph paraRight in ChildrenRight)
{ {
vlnParagraph paraRightLast = paraRight.GetFirstPieceLastPart(); vlnParagraph paraRightLast = paraRight.GetFirstPieceLastPart(includeFirstSub);
if (paraRightLast.YBottom > para.YBottom) if (paraRightLast.YBottom > para.YBottom)
para = paraRightLast; para = paraRightLast;
} }