Fixed logic for Calvert Alarm Condition/Response steps
Commented-out debug output Added logic to keep text from being very bold when it starts with a bullet Changed continue logic so that "(Continue)" does not overlap with the step tab.
This commit is contained in:
@@ -445,12 +445,14 @@ namespace Volian.Print.Library
|
||||
// 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;
|
||||
while (((YSize - yTop) > ySpaceOnCurPage) || PageBreakOnStepList.Count > 0)
|
||||
float accountForCalvertAlarmConditionResponseFooter = 0;
|
||||
while (((YSize - yTop) > (ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter)) || PageBreakOnStepList.Count > 0)
|
||||
{
|
||||
float ySpaceOnCurPageSave = ySpaceOnCurPage;
|
||||
ySpaceOnCurPage -= myBottomMsgSpace;
|
||||
vlnParagraph lastBreak = paraBreak;
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage-accountForCalvertAlarmConditionResponseFooter, yLowerLimit,
|
||||
myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
|
||||
myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
|
||||
//Console.WriteLine("Break at {0}", paraBreak.MyItemInfo.ShortPath);//Comment Out before release
|
||||
if (paraBreak == null)
|
||||
@@ -469,11 +471,15 @@ namespace Volian.Print.Library
|
||||
paraBreak = paraBreak.MyParent.ChildrenAbove[0];
|
||||
}
|
||||
// If the lastbreak was part of a condition response and the location is part of a condition response account for the size of the footer.
|
||||
else if (lastBreak != null && lastBreak.ParentHasCalvertMacro && paraBreak.ParentHasCalvertMacro)
|
||||
else if (!paraBreak.MyItemInfo.IsCautionPart && !paraBreak.MyItemInfo.IsNotePart && paraBreak.ParentHasCalvertMacro && accountForCalvertAlarmConditionResponseFooter == 0)
|
||||
{
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage - vlnPrintObject.SixLinesPerInch * 4, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
|
||||
myBottomMsgSpace, MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
|
||||
}
|
||||
if (!paraBreak.MyItemInfo.IsCautionPart && !paraBreak.MyItemInfo.IsNotePart && paraBreak.ParentHasCalvertMacro)
|
||||
accountForCalvertAlarmConditionResponseFooter = 5 * SixLinesPerInch;
|
||||
else
|
||||
accountForCalvertAlarmConditionResponseFooter = 0;
|
||||
}
|
||||
if (lastBreak == paraBreak)
|
||||
{
|
||||
|
Reference in New Issue
Block a user