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