WCNCKL: Improve pagination of checklists, i.e. don’t break if 1st substep doesn’t fit on page

WCNCLK: ‘SplitText’ moved out of file & use it from RtfTools
This commit is contained in:
2014-09-09 13:11:20 +00:00
parent aa264a4e5d
commit fbb2df544c
2 changed files with 15 additions and 110 deletions

View File

@@ -500,6 +500,17 @@ namespace Volian.Print.Library
, MyItemInfo.ItemID, MyItemInfo.MyDocVersion.MyFolder.Name, MyItemInfo.ShortPath);
break;
}
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WolfcreekCKLFormat)
{
if (!paraBreak.MyItemInfo.IsHigh // not a high level step
&& paraBreak.MyParent.MyItemInfo.IsHigh // my parent is a hls
&& paraBreak.MyItemInfo.MyPrevious == null // first substep
&& paraBreak.MyParent.MyItemInfo.FormatStepData.UseSmartTemplate) // my parent has the checklist header
{
if (DebugPagination.IsOpen) DebugPagination.WriteLine("Breaking at parent of {0}", paraBreak.MyItemInfo.DisplayText);
paraBreak = paraBreak.MyParent;
}
}
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm) // only do the following for Calvert Alarms
{
//if (lastBreak != null && lastBreak.MyItemInfo.InList(42656,42923)) Console.WriteLine("here");