Fixed change bar position on boxed Notes and Cautions.
This commit is contained in:
parent
25b5e4ad2a
commit
a0f03d11f3
@ -2038,6 +2038,7 @@ namespace Volian.Print.Library
|
|||||||
float cols = formatInfo.MyStepSectionLayoutData.ColS ?? 0;
|
float cols = formatInfo.MyStepSectionLayoutData.ColS ?? 0;
|
||||||
int colr = ToInt(formatInfo.MyStepSectionLayoutData.ColRTable, maxRNO);
|
int colr = ToInt(formatInfo.MyStepSectionLayoutData.ColRTable, maxRNO);
|
||||||
float tmpc = c;
|
float tmpc = c;
|
||||||
|
Box bxCautNote = null; // used for notes and cautions in the Prairie Island Alarms format
|
||||||
if (MyItemInfo.IsCaution || MyItemInfo.IsNote)
|
if (MyItemInfo.IsCaution || MyItemInfo.IsNote)
|
||||||
{
|
{
|
||||||
// Temporary fix for change bars on Notes and Cautions where the FixedChgCol < -10
|
// 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;
|
int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex;
|
||||||
if (bxIndx != null)
|
if (bxIndx != null)
|
||||||
{
|
{
|
||||||
Box bx = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
bxCautNote = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx];
|
||||||
if (bx != null)
|
if (bxCautNote != null)
|
||||||
tmpc = (float)bx.Start + (float)bx.End; // end position of a boxed Caution / Note
|
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:
|
// 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)
|
//if ((fixedChgCol==0) || paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
|
||||||
{
|
{
|
||||||
float rightEdge = (paragraph.XOffset + paragraph.Width + 5);
|
float rightEdge = (paragraph.XOffset + paragraph.Width + 5);
|
||||||
rightEdge-=(float)paragraph.MyItemInfo.MyDocStyle.Layout.LeftMargin;
|
rightEdge -= (float)paragraph.MyItemInfo.MyDocStyle.Layout.LeftMargin;
|
||||||
rightEdge = rightEdge/paragraph.MyItemInfo.FormatStepData.Font.CharsToTwips;
|
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;
|
return (int)rightEdge;
|
||||||
}
|
}
|
||||||
if (fixedChgCol < -10 || fixedChgCol >= 0)
|
if (fixedChgCol < -10 || fixedChgCol >= 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user