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
f8aad3efbc
commit
74f88b6c1c
@ -680,11 +680,14 @@ namespace Volian.Print.Library
|
||||
{
|
||||
float spaceOnPage = yUpperLimit + yLocation;
|
||||
vlnParagraph myPara = myList[stepLevel][yLocation];
|
||||
if (MaxBreakLevel(yLocation, myList) > stepLevel)
|
||||
int maxLev = stepLevel;
|
||||
if (spaceOnPage > 0 && (maxLev = MaxBreakLevel(yLocation, myList, stepLevel)) > stepLevel)
|
||||
{
|
||||
//DebugPagination.WriteLine("Adjust for Max StepLevel");
|
||||
break;
|
||||
//DebugPagination.WriteLine("'Adjust for Max StepLevel',{0},{1},{2},'{3}'",myPara.MyItemInfo.ItemID,stepLevel,maxLev, myPara.MyItemInfo.ShortPath);
|
||||
//break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RNOContinueOnly && !myPara.MyItemInfo.IsInRNO)
|
||||
yAddForBtmMsg = myBottomMsgSpace;
|
||||
else
|
||||
@ -788,19 +791,24 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//DebugPagination.Write(minBuff.ToString());
|
||||
if (-yLocationMin > yUpperLimit && minPara2 != null) minPara = null;
|
||||
//if (minPara != null) DebugPagination.WriteLine("### 111111 {0}", minPara);
|
||||
//if(minPara2 != null) DebugPagination.WriteLine("### n222222 {0}", minPara2);
|
||||
return minPara ?? minPara2;
|
||||
}
|
||||
private static int MaxBreakLevel(float yLocation, StepLevelList myList)
|
||||
private static int MaxBreakLevel(float yLocation, StepLevelList myList, int maxLevel)
|
||||
{
|
||||
int maxLevel = 0;
|
||||
foreach (int stepLevel in myList.Keys)
|
||||
foreach (float yLoc in myList[stepLevel].Keys)
|
||||
if (yLocation == yLoc)
|
||||
maxLevel = Math.Max(stepLevel, maxLevel);
|
||||
if (stepLevel > maxLevel)
|
||||
{
|
||||
//vlnParagraph myPara = myList[stepLevel][yLoc];
|
||||
//DebugPagination.WriteLine("'MaxBreakLevel',{0},{1},'{2}'", myPara.MyItemInfo.ItemID, stepLevel, myPara.MyItemInfo.ShortPath);
|
||||
maxLevel = stepLevel;
|
||||
}
|
||||
return maxLevel;
|
||||
}
|
||||
//private void WalkStepLevel(float yTopMost)
|
||||
|
Loading…
x
Reference in New Issue
Block a user