diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs index 903b3630..7c7d727a 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs @@ -551,9 +551,28 @@ namespace VEPROMS.CSLA.Library case 2: // step ItemInfo pitem = item; + bool hasDelim = item.ActiveFormat.PlantFormat.FormatData.TransData.StepSubstepDelimeter != null; + List DelimList = null; + if (!hasDelim) + { + DelimList = new List(); + SeqTabFmtList seqtabs = item.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.SeqTabFmtList; + foreach (SeqTabFmt seqtab in seqtabs) + { + string delim = seqtab.PrintTabFormat.Replace("{seq}", ""); + DelimList.Add(delim.Trim()); + } + } + while (!pitem.IsHigh) { string thisTab = StepInfo.Get(pitem.ItemID).MyTab.CleanText; + // remove delimiters of '.' and ')' in tab. + if (!hasDelim) + { + // get list of delimiters to remove from the format: + foreach (string rmvDelim in DelimList) thisTab = thisTab.Replace(rmvDelim, ""); + } if (pitem.IsRNOPart) { if (thisTab == null || thisTab == "") @@ -569,7 +588,7 @@ namespace VEPROMS.CSLA.Library if (thisTab != null && thisTab != "") { thisTab = thisTab.Trim(" ".ToCharArray()); - if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")")) thisTab = thisTab + "."; + if (hasDelim && !thisTab.EndsWith(".") && !thisTab.EndsWith(")")) thisTab = thisTab + "."; } sret = thisTab + sret; } @@ -580,8 +599,10 @@ namespace VEPROMS.CSLA.Library if (pitem.IsHigh) { string hlsTab = StepInfo.Get(pitem.ItemID).MyTab.CleanText; + if (!hasDelim) + foreach (string rmvDelim in DelimList) hlsTab = hlsTab.Replace(rmvDelim, ""); hlsTab = hlsTab.Trim(" ".ToCharArray()); - if (!hlsTab.EndsWith(".") && !hlsTab.EndsWith(")")) hlsTab = hlsTab + "."; + if (hasDelim && !hlsTab.EndsWith(".") && !hlsTab.EndsWith(")")) hlsTab = hlsTab + "."; sret = hlsTab + sret; } break;