If the pagebreak is occuring at a location in the AER and RNO columns, use the maximum step level to determine the proper place to break.
This commit is contained in:
parent
c99b216e51
commit
0808404bea
@ -490,6 +490,8 @@ namespace Volian.Print.Library
|
||||
myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
|
||||
myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
|
||||
//Console.WriteLine("Break at {0}", paraBreak.MyItemInfo.ShortPath);//Comment Out before release
|
||||
if (lastBreak != null && lastBreak.MyItemInfo.InList(80091))
|
||||
Console.WriteLine("After 80091 {0}",paraBreak.ToString());
|
||||
if (paraBreak == null)
|
||||
{
|
||||
if (DebugPagination.IsOpen) DebugPagination.WriteLine("<<< ERROR >>> Cannot find a place to break ==>,{0},'{1}','{2}',{3},{4}"
|
||||
@ -678,6 +680,11 @@ namespace Volian.Print.Library
|
||||
{
|
||||
float spaceOnPage = yUpperLimit + yLocation;
|
||||
vlnParagraph myPara = myList[stepLevel][yLocation];
|
||||
if (MaxBreakLevel(yLocation, myList) > stepLevel)
|
||||
{
|
||||
//DebugPagination.WriteLine("Adjust for Max StepLevel");
|
||||
break;
|
||||
}
|
||||
if (RNOContinueOnly && !myPara.MyItemInfo.IsInRNO)
|
||||
yAddForBtmMsg = myBottomMsgSpace;
|
||||
else
|
||||
@ -787,7 +794,15 @@ namespace Volian.Print.Library
|
||||
//if(minPara2 != null) DebugPagination.WriteLine("### n222222 {0}", minPara2);
|
||||
return minPara ?? minPara2;
|
||||
}
|
||||
|
||||
private static int MaxBreakLevel(float yLocation, StepLevelList myList)
|
||||
{
|
||||
int maxLevel = 0;
|
||||
foreach (int stepLevel in myList.Keys)
|
||||
foreach (float yLoc in myList[stepLevel].Keys)
|
||||
if (yLocation == yLoc)
|
||||
maxLevel = Math.Max(stepLevel, maxLevel);
|
||||
return maxLevel;
|
||||
}
|
||||
//private void WalkStepLevel(float yTopMost)
|
||||
//{
|
||||
// foreach (vlnParagraph child in ChildrenAbove)
|
||||
|
Loading…
x
Reference in New Issue
Block a user