The logic was changed to keep the first continuuous subsection on the same page as its header.

This commit is contained in:
Rich 2014-10-01 15:16:34 +00:00
parent 8b9a092708
commit 183bdf015a

View File

@ -162,7 +162,7 @@ namespace Volian.Print.Library
KeepStepsOnPage = false;
if (ySizeIncludingFirst == YSize) KeepStepsOnPage = false;
float ySectionEndMsg = !_skipEndMessage && MyItemInfo.IsSection && MyItemInfo.Steps != null && MyItemInfo.Steps.Count == 1 && (MyItemInfo.MyDocStyle.End.Message ?? "") != "" ? 2 * SixLinesPerInch : 0;
if (!KeepStepsOnPage && ySizeIncludingFirst + ySectionEndMsg > (yLocation - yBottomMargin))
if (!KeepStepsOnPage && ySizeIncludingFirst + ySectionEndMsg > (yLocation - yBottomMargin)&& ! nearTheTop)
{
ShowPageBreak(4, "Page Break Before Continuous Step Section", "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak);
return 1;