Limit Calvert Alarm logic for Condition/Response to only be run for SpecialCaseCalvertAlarm format flag.

Added debug logic for TextAt counter.
This commit is contained in:
Rich 2014-08-18 18:38:39 +00:00
parent 35bed5b381
commit dec6a46080
2 changed files with 18 additions and 10 deletions

View File

@ -461,6 +461,8 @@ namespace Volian.Print.Library
, MyItemInfo.ItemID, MyItemInfo.MyDocVersion.MyFolder.Name, MyItemInfo.ShortPath);
break;
}
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm) // only do the following for Calvert Alarms
{
// if first condition/response and the parent has caution, notes or warnings then move the break to the caution, note or warning
if (paraBreak.ParentHasCalvertMacro && paraBreak.MyParent.HasCalvertMacro && paraBreak.MyItemInfo.MyPrevious == null && paraBreak.MyParent.ChildrenAbove.Count > 0)
{
@ -472,6 +474,7 @@ namespace Volian.Print.Library
paraBreak = FindPageBreak(yStart, ySpaceOnCurPage - 12 * 4, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
myBottomMsgSpace, MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
}
}
if (lastBreak == paraBreak)
{
throw (new Exception(string.Format("Pagination Infinite Loop {0}",lastBreak.MyItemInfo.ShortPath)));

View File

@ -81,7 +81,12 @@ namespace Volian.Print.Library
}
private static int NextTextAtCounter
{
get { return ++TextAtCounter; }
get
{
int retval = ++TextAtCounter;
//if (InList(retval, 461)) Console.WriteLine("TextAt {0}", retval);
return retval;
}
}
public static float TextAt(PdfContentByte cb, Paragraph iParagraph, float x, float y, float width, float height, string debugText, float yBottomMargin)
{