Check for a null value if a page break cannot be found in a step.
Fixed logic for steps with End Messages.
This commit is contained in:
parent
237b82df01
commit
b2aa854328
@ -516,7 +516,6 @@ namespace Volian.Print.Library
|
||||
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage-accountForCalvertAlarmConditionResponseFooter, yLowerLimit,
|
||||
myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
|
||||
myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
|
||||
float yLoc = ySpaceOnCurPage - (paraBreak.YOffset - (YTopMost + yTop));
|
||||
//Console.WriteLine("Break at {0}", paraBreak.MyItemInfo.ShortPath);//Comment Out before release
|
||||
//if (lastBreak != null && lastBreak.MyItemInfo.InList(80091, 1985))
|
||||
// Console.WriteLine("After 80091 {0}",paraBreak.ToString());
|
||||
@ -528,6 +527,7 @@ namespace Volian.Print.Library
|
||||
, MyItemInfo.ItemID, MyItemInfo.MyDocVersion.MyFolder.Name, MyItemInfo.ShortPath);
|
||||
break;
|
||||
}
|
||||
float yLoc = ySpaceOnCurPage - (paraBreak.YOffset - (YTopMost + yTop));
|
||||
if (yLoc <= 0) // Check where it would break if the space on the page was one line shorter
|
||||
{
|
||||
vlnParagraph paraBreak2 = FindPageBreak(yStart, ySpaceOnCurPage - (SixLinesPerInch + accountForCalvertAlarmConditionResponseFooter), yLowerLimit,
|
||||
@ -698,7 +698,7 @@ namespace Volian.Print.Library
|
||||
RemoveProcessedParagraphs(myList, yTopNew - yTop);
|
||||
yTop = yTopNew;
|
||||
MyPageHelper.ParaBreaks.Add(paraBreak);
|
||||
ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
||||
ySpaceOnCurPage = yPageSize - (myTopMsgSpace + (yEndMsg == 0 ? SixLinesPerInch: 0 )); // Allow for continue message and blank line.
|
||||
ySpaceOnCurPage -= accountForSmartTemplateHeader;
|
||||
|
||||
//ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
||||
|
Loading…
x
Reference in New Issue
Block a user