Handle long complicated RNO in pagination.
This commit is contained in:
parent
d056362081
commit
3f87a0e39d
@ -366,10 +366,11 @@ namespace Volian.Print.Library
|
||||
|
||||
// while the amount to print is larger than one page, i.e. ((YSize - yTop) > ySpaceOnCurPage))
|
||||
// OR there are page breaks for HLS/cautions/notes remaining, typically for backgrounds (PageBreakOnStepList.Count > 0)
|
||||
vlnParagraph paraBreak = null;
|
||||
while (((YSize - yTop) > ySpaceOnCurPage) || PageBreakOnStepList.Count > 0)
|
||||
{
|
||||
ySpaceOnCurPage -= myBottomMsgSpace;
|
||||
vlnParagraph paraBreak = FindPageBreak(yStart, ySpaceOnCurPage, yLowerLimit, myList);
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage, yLowerLimit, myList, paraBreak);
|
||||
if (paraBreak == null)
|
||||
{
|
||||
_MyLog.ErrorFormat("<<< ERROR >>> Cannot find a place to break\r\n==>'Cannot Find Place to Break',{0},'{1}','{2}'"
|
||||
@ -417,7 +418,7 @@ namespace Volian.Print.Library
|
||||
/// <param name="yTop"></param>
|
||||
/// <param name="myList"></param>
|
||||
/// <returns></returns>
|
||||
private static vlnParagraph FindPageBreak(float yStart, float yUpperLimit, float yLowerLimit, StepLevelList myList)
|
||||
private static vlnParagraph FindPageBreak(float yStart, float yUpperLimit, float yLowerLimit, StepLevelList myList, vlnParagraph lastBreak)
|
||||
{
|
||||
vlnParagraph minPara = null;
|
||||
foreach (int stepLevel in myList.Keys) // loop thru StepLevels, starting with lowest.
|
||||
@ -425,6 +426,16 @@ namespace Volian.Print.Library
|
||||
foreach (float yLocation in myList[stepLevel].Keys) // loop thru yLocation
|
||||
{
|
||||
vlnParagraph myPara = myList[stepLevel][yLocation];
|
||||
// The following lines were added for Comanche Peak ECA-TP-11-001A.SProcedure Steps.S17 (Printed as Step 12)
|
||||
if (myPara.YSize > yUpperLimit && myPara.ChildrenRight != null && myPara.ChildrenRight.Count > 0 && myPara.ChildrenRight[0].YSize <= yUpperLimit)
|
||||
return myPara;
|
||||
// The following lines were added for Comanche Peak ECA-0.1A.SProcedure Steps.S17 (Printed as Step 12)
|
||||
// ******************** NEEDS TO BE FIXED **********************
|
||||
//vlnParagraph myParent = myPara.MyParent;
|
||||
//if (myParent != lastBreak && myParent.YSize > yUpperLimit && myParent.ChildrenRight != null && myParent.ChildrenRight.Count > 0 && myParent.ChildrenRight[0].YSize <= yUpperLimit)
|
||||
// _MyLog.WarnFormat("\r\nMyParentBreak {0},{1},{2},{3}", myParent, myParent.YSize, yUpperLimit,myParent.ChildrenRight[0].YSize);
|
||||
//Console.WriteLine("Here");
|
||||
//return myParent;
|
||||
// The top of this step will fit onto page (-yLocation < yWithinMargins)
|
||||
float wcnChkLstBorder = myPara.MyItemInfo.MyHLS != null && myPara.MyItemInfo.MyHLS.FormatStepData.UseSmartTemplate &&
|
||||
(myPara.MyItemInfo.MyHLS.FormatStepData.Suffix ?? "") != "" ? 2*SixLinesPerInch : 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user