From 867281200d89dbf056510ea4e4fc3a91de125dd4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 19 Nov 2020 17:15:03 +0000 Subject: [PATCH] B2020-154: Incorrect top continue message tab in RNO column if for substep with a Caution/Note B2020-154: Incorrect top continue message tab in RNO column if for substep with a Caution/Note (2nd fix) --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 3 ++- PROMS/Volian.Print.Library/vlnParagraph.cs | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 760ff8ec..5befcbd6 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1008,7 +1008,8 @@ namespace VEPROMS.CSLA.Library thisTab != null && thisTab != "" && thisTab.Length > 1 && char.IsLetterOrDigit(thisTab[1]); // for supplemental information, bulleted tabs need to be included in the tab. The 'isletterordigit' should not occur for supinfo items - // and this includes the parent of the supinfo since that is the tab used for supinfo concatenated with its parent. (B2017-120) - if (thisTab != null && thisTab != "" && !char.IsLetterOrDigit(thisTab[0]) && !vcbHeaderCheck && !itemInfo.IsInSupInfo && (itemInfo.SupInfos == null || itemInfo.SupInfos.Count <= 0 )) return pTab; + // // B2020-154: Added check for the tab to start with '(', tabs that started with this were not included in the combined tab + if (thisTab != null && thisTab != "" && (!char.IsLetterOrDigit(thisTab[0]) && thisTab[0] != '(') && !vcbHeaderCheck && !itemInfo.IsInSupInfo && (itemInfo.SupInfos == null || itemInfo.SupInfos.Count <= 0 )) return pTab; if (itemInfo.FormatStepData.NumberWithLevel) pTab = itemInfo.MyHLS.MyTab.CleanText.Trim(); // if the parent tab ends with a alphanumeric and this tab is alphanumeric, add a '.' to separate them // also, include use the separator for bullets if doing the supplemental information tab (B2017-120) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 552ec4f2..2c04833f 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2683,14 +2683,20 @@ namespace Volian.Print.Library while (ip.IsRNOPart) ip = ip.MyParent; myMsg = myMsg.Replace(@"%sR", ip.CombinedTab); } - // B2020-154: Incorrect top continue message tab in RNO column if for substep with a Caution/Note - else if ((MyItemInfo.IsNote || MyItemInfo.IsCaution) && (MyItemInfo.MyParent.IsRNOPart || MyItemInfo.MyParent.MyParent.IsRNOPart)) + // B2020-154: Incorrect top continue message tab in RNO column if for single level substep with a Caution/Note + else if ((MyItemInfo.IsNote || MyItemInfo.IsCaution) && MyItemInfo.MyParent.MyParent.IsRNOPart) { - if (DebugPagination.IsOpen) DebugPagination.WriteLine("***===>,'Yes','Changed RNO Continue Message',{0},{1},,{3},'{4}'", MyItemInfo.ItemID, YSize, 0, 0, this); + if (DebugPagination.IsOpen) DebugPagination.WriteLine("***===>,'Yes','Case 1:Changed RNO Continue Message',{0},{1},,{3},'{4}'", MyItemInfo.ItemID, YSize, 0, 0, this); ItemInfo ip = MyItemInfo.MyParent; while (!ip.IsRNOPart) ip = ip.MyParent; myMsg = myMsg.Replace(@"%sR", ip.CombinedTab); } + // B2020-154: Incorrect top continue message tab in RNO column for substep with a Caution/Note within parent substeps + else if ((MyItemInfo.IsNote || MyItemInfo.IsCaution) && MyItemInfo.MyParent.MyParent.IsInRNO) + { + if (DebugPagination.IsOpen) DebugPagination.WriteLine("***===>,'Yes','Case 2:Changed RNO Continue Message',{0},{1},,{3},'{4}'", MyItemInfo.ItemID, YSize, 0, 0, this); + myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.MyParent.CombinedTab); + } else myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.CombinedTab); float xor = MyTopRNO.MyTab.XOffset;