BGE: Fixed RNO Tab from AER that is bullet

B2014-072: Do not display Page Number checkbox, transitions with page number are included in list of transition types
B2014-070: Fix null reference access if editing a procedure step title in the step editor when format uses change ids
BGE: RNO X-offset location and note/caution y-offset improvements
This commit is contained in:
Kathy Ruffing 2014-06-05 12:52:29 +00:00
parent 7ea6df9049
commit f675e6c866
4 changed files with 62 additions and 14 deletions

View File

@ -2709,8 +2709,15 @@ namespace VEPROMS.CSLA.Library
_MyTab.Text = _MyTab.CleanText; _MyTab.Text = _MyTab.CleanText;
return; return;
} }
_MyTab.CleanText = MyParent.MyTab.CleanText.Substring(0, MyParent.MyTab.CleanText.IndexOf(".") + 1) + incSub; if (MyParent.MyTab.CleanText.Contains(ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB))
_MyTab.Text = MyParent.MyTab.CleanText.Substring(0, MyParent.MyTab.Text.IndexOf(".") + 1) + incSub; {
_MyTab.CleanText = MyParent.MyTab.CleanText.Trim() + "." + incSub + " ";
_MyTab.Text = _MyTab.CleanText;
return;
}
string tmprnotab = MyParent.MyTab.CleanText.Substring(0, MyParent.MyTab.CleanText.IndexOf(".") + 1) + incSub;
_MyTab.CleanText = tmprnotab.TrimStart();
_MyTab.Text = tmprnotab.TrimStart();
return; return;
} }
if ((((ItemInfo)ActiveParent).IsHigh && FormatStepData.NumberHighLevel) || ((!((ItemInfo)ActiveParent).IsHigh) && ((tbformat == null || tbformat == "") && (RNOLevel <= ColumnMode)))) if ((((ItemInfo)ActiveParent).IsHigh && FormatStepData.NumberHighLevel) || ((!((ItemInfo)ActiveParent).IsHigh) && ((tbformat == null || tbformat == "") && (RNOLevel <= ColumnMode))))

View File

@ -589,16 +589,7 @@ namespace Volian.Controls.Library
(_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[indx].Type == 1 || (_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[indx].Type == 1 ||
_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[indx].Type == 2 || _CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[indx].Type == 2 ||
_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[indx].Type == 4); _CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[indx].Type == 4);
if (_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier)
{
if (listBoxTranFmt.SelectedIndex >=0 && listBoxTranFmt.SelectedIndex <= listBoxTranFmt.Items.Count)
{
// see if format for this particular transition does page number:
if (_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[indx].TransFormat.Contains("{Page Num}"))
cbPageNum.Visible = true;
}
}
cbPageNum.Checked = false; cbPageNum.Checked = false;
if (cbPageNum.Visible) if (cbPageNum.Visible)
{ {

View File

@ -678,7 +678,7 @@ namespace Volian.Controls.Library
// if the plant has the change id option, the change id was entered when the program started. // if the plant has the change id option, the change id was entered when the program started.
// this should be saved for every piece of edited data. Note that the set of config // this should be saved for every piece of edited data. Note that the set of config
// item Step_MultipleChangeID has the save built in to it. // item Step_MultipleChangeID has the save built in to it.
if (MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChgBarMessageFromEdit) if (MyStepRTB.MyItemInfo.IsStep && MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChgBarMessageFromEdit)
{ {
StepConfig sc = MyStepRTB.MyItemInfo.MyConfig as StepConfig; StepConfig sc = MyStepRTB.MyItemInfo.MyConfig as StepConfig;
sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId; sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId;

View File

@ -1549,6 +1549,7 @@ namespace Volian.Print.Library
} }
public vlnParagraph(vlnParagraph parent, PdfContentByte cb, ItemInfo itemInfo, float xoff, float yoff, int rnoLevel, int maxRNO, FormatInfo formatInfo, string prefix, string suffix, float yoffRightParent) public vlnParagraph(vlnParagraph parent, PdfContentByte cb, ItemInfo itemInfo, float xoff, float yoff, int rnoLevel, int maxRNO, FormatInfo formatInfo, string prefix, string suffix, float yoffRightParent)
{ {
float yOffOrig = yoff;
BuildPlacekeeper(parent, itemInfo); BuildPlacekeeper(parent, itemInfo);
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);
@ -1789,6 +1790,33 @@ namespace Volian.Print.Library
yoff = ChildrenAbove.Add(cb, itemInfo.Notes, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo); yoff = ChildrenAbove.Add(cb, itemInfo.Notes, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
} }
} }
// Without the following, BGE had gaps in y-direction if the AER/RNO both had cautions/notes.
// The only time this needs done is if caution/notes are printed in separate columns in dual
// column mode (used the DoubleBoxHLS BGE flag for this - if another plant needs this, make it
// a more generic flag).
if (itemInfo.IsRNOPart && ((itemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) == E_DocStructStyle.DoubleBoxHLS) &&
rnoLevel == maxRNO && ChildrenAbove.Count > 0 && MyParent.ChildrenAbove.Count > 0)
{
float yDeltaRno = yoff - yOffOrig;
float yDeltaAer = SixLinesPerInch + yOffOrig - MyParent.ChildrenAbove[0].YTopMost;
if (yDeltaRno > yDeltaAer)
{
foreach (vlnParagraph chlda in MyParent.ChildrenAbove)
{
chlda.AdjustYOffset(yDeltaAer - yDeltaRno);
}
foreach (vlnParagraph chld in ChildrenAbove)
chld.AdjustYOffset(yDeltaAer);
yoff -= yDeltaAer;
}
else
{
foreach (vlnParagraph chld in ChildrenAbove)
chld.AdjustYOffset(yDeltaRno);
yoff -= yDeltaRno;
}
}
// Comanche Peak uses CAUTION2 type to enter a Step Designator, which is placed to the left of the step number. // Comanche Peak uses CAUTION2 type to enter a Step Designator, which is placed to the left of the step number.
// The Step Designator information is saved during the processing of the Cautions (ChildrenAbove) // The Step Designator information is saved during the processing of the Cautions (ChildrenAbove)
// defined in the vlnParagraphs class (of which ChildrenAbove is defined) // defined in the vlnParagraphs class (of which ChildrenAbove is defined)
@ -2256,6 +2284,15 @@ namespace Volian.Print.Library
if (XOffsetCenter != null) XOffset = (float)XOffsetCenter; if (XOffsetCenter != null) XOffset = (float)XOffsetCenter;
} }
private void AdjustYOffset(float yDelta)
{
YOffset -= yDelta;
foreach (vlnPrintObject vpo in PartsAbove)
vpo.YOffset -= yDelta;
foreach (vlnParagraph vp in ChildrenBelow)
vp.AdjustYOffset(yDelta);
}
private void BuildPlacekeeper(vlnParagraph parent, ItemInfo itemInfo) private void BuildPlacekeeper(vlnParagraph parent, ItemInfo itemInfo)
{ {
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 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
@ -3209,9 +3246,22 @@ namespace Volian.Print.Library
XOffset -= (itemInfo.MyTab.Offset - hls.MyTab.Offset); XOffset -= (itemInfo.MyTab.Offset - hls.MyTab.Offset);
} }
} }
// if this format has the centerline & numberwithlevel (special tabbing for rno) then
// position rno xoffset of the tab to be close to centerline & text indented from there (only BGE)
if (itemInfo.MyDocStyle.CenterLineX != null && itemInfo.FormatStepData.NumberWithLevel)
{
// if the tab is 3 char or smaller, make the indent amount for the rno text 4 characters.
// if bigger, make it the additional tab size.
int len = myTab.Text.Trim().Length;
int adj = len <= 3 ? 4 : (len - 3) + 4;
float rnoOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)itemInfo.MyDocStyle.CenterLineX + 5;
float tPtPerChar = itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TabPtsPerChar ?? 6;
XOffset = rnoOffset + tPtPerChar * adj;
if (myTab != null) myTab.XOffset = rnoOffset;
}
// if the step is within the rno and we're numbering the high level rno, we've got to account for the // if the step is within the rno and we're numbering the high level rno, we've got to account for the
// indenting (increased x offset) for the top level rno's tab, if there is no top level rno: // indenting (increased x offset) for the top level rno's tab, if there is no top level rno:
if (itemInfo.FormatStepData.NumberHighLevel && (itemInfo.MyHLS.RNOs == null || itemInfo.MyHLS.RNOs.Count <= 0)) else if (itemInfo.FormatStepData.NumberHighLevel && (itemInfo.MyHLS.RNOs == null || itemInfo.MyHLS.RNOs.Count <= 0))
{ {
// add in the size that an RNO off HLS would take. // add in the size that an RNO off HLS would take.
tabWidth += itemInfo.MyTab.RNOTabWidthAdjust; tabWidth += itemInfo.MyTab.RNOTabWidthAdjust;