Fixed change bar position on boxed Notes and Cautions.

This commit is contained in:
John Jenko 2013-10-08 15:26:10 +00:00
parent 25b5e4ad2a
commit a0f03d11f3

View File

@ -2038,6 +2038,7 @@ namespace Volian.Print.Library
float cols = formatInfo.MyStepSectionLayoutData.ColS ?? 0;
int colr = ToInt(formatInfo.MyStepSectionLayoutData.ColRTable, maxRNO);
float tmpc = c;
Box bxCautNote = null; // used for notes and cautions in the Prairie Island Alarms format
if (MyItemInfo.IsCaution || MyItemInfo.IsNote)
{
// Temporary fix for change bars on Notes and Cautions where the FixedChgCol < -10
@ -2046,9 +2047,9 @@ namespace Volian.Print.Library
int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex;
if (bxIndx != null)
{
Box bx = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
if (bx != null)
tmpc = (float)bx.Start + (float)bx.End; // end position of a boxed Caution / Note
bxCautNote = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
if (bxCautNote != null)
tmpc = (float)bxCautNote.Start + (float)bxCautNote.End; // end position of a boxed Caution / Note
}
}
// if this is a caution or note, put the change bar to the right of the text:
@ -2057,8 +2058,10 @@ namespace Volian.Print.Library
//if ((fixedChgCol==0) || paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
{
float rightEdge = (paragraph.XOffset + paragraph.Width + 5);
rightEdge-=(float)paragraph.MyItemInfo.MyDocStyle.Layout.LeftMargin;
rightEdge = rightEdge/paragraph.MyItemInfo.FormatStepData.Font.CharsToTwips;
rightEdge -= (float)paragraph.MyItemInfo.MyDocStyle.Layout.LeftMargin;
if (bxCautNote != null)
rightEdge = (float)bxCautNote.End + 10; // used for notes and cautions in the Prairie Island Alarms format
rightEdge = rightEdge / paragraph.MyItemInfo.FormatStepData.Font.CharsToTwips;
return (int)rightEdge;
}
if (fixedChgCol < -10 || fixedChgCol >= 0)