Determine the height of the Section Continue message at the top of a page, so that the steps paginate properly.

This commit is contained in:
Rich 2015-02-26 18:47:30 +00:00
parent 5f8c27367f
commit 5d227213c5

View File

@ -517,6 +517,7 @@ namespace Volian.Print.Library
}
private void BuildPageBreakList(float ySpaceOnCurPage, float yPageSize, bool KeepStepsOnPage, float yEndMsg)
{
float topContinueHeight=2 * SixLinesPerInch;
int profileDepth = ProfileTimer.Push(">>>> BuildPageBreakList");
// if this paragraph is flagged to pagebreakonstep (i.e. these are used by background documents
// to get each hls/caution/note to be on its own page), then any of the children above should
@ -587,7 +588,16 @@ namespace Volian.Print.Library
string myTopMsg = docstyle.Continue.Top.Message;
float myTopMsgSpace = ((myTopMsg ?? "") != "") ? 2 * SixLinesPerInch : 0;
if (myTopMsgSpace > 0)
{
vlnParagraph parSection = this.MyParent;
while (!parSection.MyItemInfo.IsSection) parSection = parSection.MyParent;
topContinueHeight = parSection.ContinueHeight;
if (topContinueHeight > myTopMsgSpace)
{
myTopMsgSpace = topContinueHeight;
}
}
// 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;