Revert "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"

This reverts commit 82fa4f1e74882ba3024656ea735087d8dc0f7c79.
This commit is contained in:
Paul Larsen 2024-02-26 15:08:52 -05:00
parent 9804cf0fce
commit 6078d30a94
2 changed files with 9 additions and 26 deletions

View File

@ -569,22 +569,9 @@ namespace Volian.Print.Library
KeepStepsOnPage = false;
}
}
if (KeepStepsOnPage && ySizeIncludingFirst > (yWithinMargins - ySizeBtmCtnMess1 - ySizeBtmEndMess1))
{
// 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;
}
// 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 (KeepStepsOnPage && !alarmPageKeepHighWithSubs && ySizeIncludingFirst > (yWithinMargins - ySizeBtmCtnMess1 - ySizeBtmEndMess1)) KeepStepsOnPage = false;
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

View File

@ -3316,11 +3316,9 @@ namespace Volian.Print.Library
/// This gets the height of the step with it's Caution's, Notes and potentially any First Substeps
/// </summary>
/// <returns></returns>
// 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)
private float GetFirstPieceSize()
{
vlnParagraph paraLast = GetFirstPieceLastPart(includeFirstSub);
vlnParagraph paraLast = GetFirstPieceLastPart();
float retval = (paraLast.YBottom) - YTopMost;
//Console.WriteLine(MyItemInfo.DBSequence);
return retval;
@ -3374,12 +3372,10 @@ namespace Volian.Print.Library
get { return _YBottomForBox; }
set { _YBottomForBox = value; }
}
// 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)
private vlnParagraph GetFirstPieceLastPart()
{
vlnParagraph para = this;
if ((!MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PaginateOnFirstSubstep || includeFirstSub) && ChildrenBelow != null && ChildrenBelow.Count > 0)
if (!MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PaginateOnFirstSubstep && ChildrenBelow != null && ChildrenBelow.Count > 0)
{
// 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}";
@ -3392,14 +3388,14 @@ namespace Volian.Print.Library
if (keepEqListTogether && !ChildrenBelow[0].MyItemInfo.IsSequential && !this.MyItemInfo.IsHigh) // Extend to the last Item.
para = ChildrenBelow[ChildrenBelow.Count - 1].GetFirstPieceLastPart();
else
para = ChildrenBelow[0].GetFirstPieceLastPart(includeFirstSub);
para = ChildrenBelow[0].GetFirstPieceLastPart();
}
}
if (ChildrenRight != null && ChildrenRight.Count > 0)
{
foreach (vlnParagraph paraRight in ChildrenRight)
{
vlnParagraph paraRightLast = paraRight.GetFirstPieceLastPart(includeFirstSub);
vlnParagraph paraRightLast = paraRight.GetFirstPieceLastPart();
if (paraRightLast.YBottom > para.YBottom)
para = paraRightLast;
}