Support the impact of the Section Continue Message on Pagination
Added logic to determine if the Section Continue Message would be printed.
This commit is contained in:
@@ -171,6 +171,13 @@ namespace Volian.Print.Library
|
||||
return 0; // Don't Paginate (page break) on a Step Section if it's first thing on page
|
||||
}
|
||||
if (!MyItemInfo.IsHigh) return 0; // Don't Paginate on a Substep level
|
||||
bool doSectionTitleContinued = false;
|
||||
if (MyItemInfo.InList(1148, 391)) Console.Write("Here");
|
||||
if (MyItemInfo.MyPrevious != null && !MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||
{
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
||||
}
|
||||
// Document style: DSS_PageBreakHLS breaks on hls.
|
||||
if (MyItemInfo.IsHigh && (MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageBreakHLS) == E_DocStructStyle.DSS_PageBreakHLS)
|
||||
{
|
||||
@@ -267,7 +274,14 @@ namespace Volian.Print.Library
|
||||
|
||||
// Keep figure (the only figure, i.e. count==1) with its parent.
|
||||
if (ChildrenBelow.Count == 1 && ChildrenBelow[0].MyItemInfo.IsFigure) KeepStepsOnPage = false;
|
||||
|
||||
float sectionSpace = 0;
|
||||
if (doSectionTitleContinued)
|
||||
{
|
||||
sectionSpace = 2 * SixLinesPerInch;// this should actuall use the physical size of the continue messsage.
|
||||
yPageSizeNextPage -= sectionSpace;
|
||||
yExtra -= sectionSpace;
|
||||
yExtra2 -= sectionSpace;
|
||||
}
|
||||
if (!KeepWithHeader && !KeepStepsOnPage && YSize - SixLinesPerInch + yEndMsg <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break
|
||||
{
|
||||
// Don't want extra line before step
|
||||
@@ -450,6 +464,8 @@ namespace Volian.Print.Library
|
||||
// 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
|
||||
// also have the flag set and be added to the pagebreakonsteplist so that a break occurs.
|
||||
if (MyItemInfo.InList(391))
|
||||
Console.WriteLine("here");
|
||||
List<vlnParagraph> PageBreakOnStepList = new List<vlnParagraph>();
|
||||
if (PageBreakOnStep)
|
||||
{
|
||||
|
Reference in New Issue
Block a user