B2015-033 made the position of AER and RNO change bars consistent among sub-step levels for change bars that are placed next to the text.
This commit is contained in:
parent
ad1358d77e
commit
9595cded52
@ -2629,6 +2629,12 @@ namespace Volian.Print.Library
|
|||||||
get { return _MyPlaceKeeper; }
|
get { return _MyPlaceKeeper; }
|
||||||
set { _MyPlaceKeeper = value; }
|
set { _MyPlaceKeeper = value; }
|
||||||
}
|
}
|
||||||
|
private pkParagraph _MyContAct = null;
|
||||||
|
public pkParagraph MyContAct
|
||||||
|
{
|
||||||
|
get { return _MyContAct; }
|
||||||
|
set { _MyContAct = value; }
|
||||||
|
}
|
||||||
public static bool InList(int id, params int[] ids)
|
public static bool InList(int id, params int[] ids)
|
||||||
{
|
{
|
||||||
foreach (int listid in ids)
|
foreach (int listid in ids)
|
||||||
@ -2702,6 +2708,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
float yOffOrig = yoff;
|
float yOffOrig = yoff;
|
||||||
BuildPlacekeeper(parent, itemInfo);
|
BuildPlacekeeper(parent, itemInfo);
|
||||||
|
//BuildContinuousActionSummary(parent, itemInfo); - under construction - jsj
|
||||||
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj != null)
|
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj != null)
|
||||||
_MyBoxLeftAdj = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj);
|
_MyBoxLeftAdj = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj);
|
||||||
ShowSectionTitles = formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles || itemInfo.MyDocStyle.ShowSectionTitles;
|
ShowSectionTitles = formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ShowSectionTitles || itemInfo.MyDocStyle.ShowSectionTitles;
|
||||||
@ -3838,6 +3845,70 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BuildContinuousActionSummary(vlnParagraph parent, ItemInfo itemInfo)
|
||||||
|
{
|
||||||
|
if (itemInfo.InList(41553,41472,41447))
|
||||||
|
Console.WriteLine("Stop");
|
||||||
|
//if (itemInfo is SectionInfo) //&& (itemInfo as SectionInfo).SectionConfig.Section_Placekeeper.ToUpper() != "N") // if is a section type and the section is marked to create placekeeper
|
||||||
|
//{
|
||||||
|
// MyContAct = new pkParagraph(this);
|
||||||
|
// if (parent != null && parent.MyItemInfo.IsSection)
|
||||||
|
// parent.MyContAct = MyContAct;
|
||||||
|
//}
|
||||||
|
//else if (parent != null && parent.MyContAct != null && itemInfo is StepInfo)//InList(parent.MyItemInfo.ItemID, 513, 514, 519, 520, 525))
|
||||||
|
//{
|
||||||
|
// StepConfig sc = itemInfo.MyConfig as StepConfig;
|
||||||
|
// if (sc != null && sc.Step_CAS == true)
|
||||||
|
// {
|
||||||
|
// if (itemInfo.IsCautionPart || itemInfo.IsNotePart)
|
||||||
|
// MyContAct = parent.MyContAct.AddCautionsAndNotes(this);
|
||||||
|
// else
|
||||||
|
// MyContAct = parent.MyContAct.AddChild(this);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
if (itemInfo is SectionInfo) //&& (itemInfo as SectionInfo).SectionConfig.Section_Placekeeper.ToUpper() != "N") // if is a section type and the section is marked to create placekeeper
|
||||||
|
{
|
||||||
|
MyContAct = new pkParagraph(this);
|
||||||
|
if (parent != null && parent.MyItemInfo.IsSection)
|
||||||
|
parent.MyContAct = MyContAct;
|
||||||
|
}
|
||||||
|
else if (itemInfo is StepInfo)//InList(parent.MyItemInfo.ItemID, 513, 514, 519, 520, 525))
|
||||||
|
{
|
||||||
|
StepConfig sc = itemInfo.MyConfig as StepConfig;
|
||||||
|
if (sc != null && sc.Step_CAS == true)
|
||||||
|
{
|
||||||
|
//if (parent != null && parent.MyContAct == null)
|
||||||
|
// parent.MyContAct = new pkParagraph(parent);
|
||||||
|
vlnParagraph tparent = parent;
|
||||||
|
while (tparent != null && tparent.MyContAct == null)// .MyParent != null && tparent.MyParent.MyContAct == null) //&& tparent.MyParent.MyItemInfo is StepInfo)//tparent.MyParent.MyContAct == null)
|
||||||
|
{
|
||||||
|
//if (tparent.MyParent.MyContAct != null)
|
||||||
|
// tparent.MyContAct = tparent.MyParent.MyContAct.AddChild(tparent);
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
//}
|
||||||
|
//if (tparent.MyParent.MyContAct == null)
|
||||||
|
// tparent.MyParent.MyContAct = new pkParagraph(tparent.MyParent);
|
||||||
|
//tparent.MyParent.MyContAct.AddChild(tparent);
|
||||||
|
tparent = tparent.MyParent;
|
||||||
|
}
|
||||||
|
//if (parent.MyContAct == null)
|
||||||
|
//{
|
||||||
|
// parent.MyContAct = new pkParagraph(parent);
|
||||||
|
//}
|
||||||
|
if (parent.MyContAct != null)
|
||||||
|
{
|
||||||
|
if (itemInfo.IsCautionPart || itemInfo.IsNotePart)
|
||||||
|
MyContAct = parent.MyContAct.AddCautionsAndNotes(this);
|
||||||
|
else
|
||||||
|
MyContAct = parent.MyContAct.AddChild(this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
MyContAct = tparent.MyContAct.AddChild(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private vlnParagraph FindParentRNO()
|
private vlnParagraph FindParentRNO()
|
||||||
{
|
{
|
||||||
if (ChildrenRight != null && ChildrenRight.Count > 0) return ChildrenRight[0];
|
if (ChildrenRight != null && ChildrenRight.Count > 0) return ChildrenRight[0];
|
||||||
@ -4259,7 +4330,9 @@ namespace Volian.Print.Library
|
|||||||
itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds);
|
itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ChangeBarLocation(float c, vlnParagraph paragraph, FormatInfo formatInfo, int maxRNO)
|
// changed this function to return a float instead of an int to correct a rounding error which cause change bars
|
||||||
|
// to inconsistantly position next to changed text. Bug B2015-033
|
||||||
|
private float ChangeBarLocation(float c, vlnParagraph paragraph, FormatInfo formatInfo, int maxRNO)
|
||||||
{
|
{
|
||||||
int fixedChgCol = formatInfo.PlantFormat.FormatData.ProcData.ChangeBarData.FixedChangeColumn ?? 0;
|
int fixedChgCol = formatInfo.PlantFormat.FormatData.ProcData.ChangeBarData.FixedChangeColumn ?? 0;
|
||||||
float cols = formatInfo.MyStepSectionLayoutData.ColS ?? 0;
|
float cols = formatInfo.MyStepSectionLayoutData.ColS ?? 0;
|
||||||
@ -4289,7 +4362,7 @@ namespace Volian.Print.Library
|
|||||||
if (bxCautNote != null)
|
if (bxCautNote != null)
|
||||||
rightEdge = (float)bxCautNote.End + 10; // used for notes and cautions in the Prairie Island Alarms format
|
rightEdge = (float)bxCautNote.End + 10; // used for notes and cautions in the Prairie Island Alarms format
|
||||||
rightEdge = rightEdge / paragraph.MyItemInfo.FormatStepData.Font.CharsToTwips;
|
rightEdge = rightEdge / paragraph.MyItemInfo.FormatStepData.Font.CharsToTwips;
|
||||||
return (int)rightEdge;
|
return rightEdge;
|
||||||
}
|
}
|
||||||
if (fixedChgCol < -10 || fixedChgCol >= 0)
|
if (fixedChgCol < -10 || fixedChgCol >= 0)
|
||||||
return ((fixedChgCol > 0) ? fixedChgCol :
|
return ((fixedChgCol > 0) ? fixedChgCol :
|
||||||
@ -4298,7 +4371,7 @@ namespace Volian.Print.Library
|
|||||||
//(c > (cols + colr + COL_WID_ADJ) || (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? -fixedChgCol :
|
//(c > (cols + colr + COL_WID_ADJ) || (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? -fixedChgCol :
|
||||||
AERLeftChangeBarLocation(formatInfo));
|
AERLeftChangeBarLocation(formatInfo));
|
||||||
else
|
else
|
||||||
return (int)(fixedChgCol + (((c < cols + Width + colr) || TableTest()
|
return (fixedChgCol + (((c < cols + Width + colr) || TableTest()
|
||||||
|| MyItemInfo.IsCaution || MyItemInfo.IsNote) ? 0 : cols + colr)); // || (GetColumnMode() == 0)) ? 0 : cols + colr));
|
|| MyItemInfo.IsCaution || MyItemInfo.IsNote) ? 0 : cols + colr)); // || (GetColumnMode() == 0)) ? 0 : cols + colr));
|
||||||
/* Change bars to left of text -- ColS+WidS+ColR is the end of RNO col*/
|
/* Change bars to left of text -- ColS+WidS+ColR is the end of RNO col*/
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user