diff --git a/PROMS/Formats/fmtall/WCN1all.xml b/PROMS/Formats/fmtall/WCN1all.xml index 01504599..4949db19 100644 Binary files a/PROMS/Formats/fmtall/WCN1all.xml and b/PROMS/Formats/fmtall/WCN1all.xml differ diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index b6be265e..760ff8ec 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1017,6 +1017,7 @@ namespace VEPROMS.CSLA.Library if (ms && mn) pTab = pTab.TrimEnd() + "."; // remove ending '.' (if this is a hls, don't remove the '.') if (!itemInfo.IsHigh && thisTab.EndsWith(".")) thisTab = thisTab.Substring(0, thisTab.Length - 1); + if (itemInfo.HasParentTab) return thisTab.Trim(); // F2020-023: if tab includes parent tab already, don't concatenate it return pTab + thisTab.Trim(); } internal static void SetParentSectionAndDocVersion(ItemInfo itemInfo, IVEDrillDownReadOnly itemParent, SectionInfo sectionInfo, DocVersionInfo docVersionInfo, TransitionLookup tranLookup) @@ -1106,6 +1107,13 @@ namespace VEPROMS.CSLA.Library get { return _OffsetTab; } set { _OffsetTab = value; } } + // F2020-023: tab includes parent tab + private bool _HasParentTab = false; + public bool HasParentTab + { + get { return _HasParentTab; } + set { _HasParentTab = value; } + } private int _PrintLevel = 0; public int PrintLevel { @@ -4165,6 +4173,7 @@ namespace VEPROMS.CSLA.Library (myparent.IsStepPart && myparent.FormatStepData.AppendDotZero)) // F2018-022 Added step type flag to append a ".0" to the end of the high level step - put in for Westinghouse single column format (wst1), B2018-119 only do this for steps parentTab = parentTab.Replace(".0", ""); // this was added in, remove for substeps. tbformat = parentTab + (parentTab.EndsWith(".") ? "" : parentTab == "" ? "" : ".") + tbformat.TrimStart(); + HasParentTab = true; // F2020-023: tab includes parent tab } else if (IsSequential && ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.SkipNonSeqTabWithPar) { @@ -4182,6 +4191,7 @@ namespace VEPROMS.CSLA.Library { parentTab = mpar.MyTab.CleanText.Trim(); tbformat = parentTab + (parentTab.EndsWith(".") ? "" : ".") + tbformat.TrimStart(); + HasParentTab = true; // F2020-023: tab includes parent tab //if (_MyLog.IsInfoEnabled) _MyLog.InfoFormat("==>PARTAB: [{0}]", ShortPath + ", " + ItemID.ToString()); } } diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index ea6f1294..73dd1766 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2701,7 +2701,13 @@ namespace Volian.Print.Library if (MyItemInfo.MyParent.IsSection && (docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue) myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.MyTab.CleanText.Trim()); else - myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.CombinedTab); + { + // F2020-023: tab includes parent tab and if caution/note don't use its parent, go up another level + if (MyItemInfo.IsCautionOrNotePart) + myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.MyParent.CombinedTab); + else + myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.CombinedTab); + } } if (myMsg.IndexOf(@"%3d") > -1) myMsg = myMsg.Replace(@"%3d", MyItemInfo.MyHLS.Ordinal.ToString()); @@ -2998,6 +3004,19 @@ namespace Volian.Print.Library myMsg = myMsg.Replace(@"%2d", tb.Trim(" .".ToCharArray()).PadLeft(2)); if (myMsg.IndexOf(@"%3d") > -1) myMsg = myMsg.Replace(@"%3d", MyItemInfo.MyHLS.Ordinal.ToString()); + // F2020-023: tab includes parent tab and if caution/note don't use its parent, go up another level + if (myMsg.IndexOf(@"%s") > -1) // %s was added for F2020-023 + { + string tmp = tb.Trim(); + if (!MyItemInfo.MyParent.IsHigh) + { + if (MyItemInfo.IsCautionOrNotePart) + tmp = MyItemInfo.MyParent.MyParent.CombinedTab.Trim(); + else + tmp = MyItemInfo.MyParent.CombinedTab.Trim(); + } + myMsg = myMsg.Replace(@"%s", tmp); + } return myMsg; } private vlnParagraph TopMostChild