From 4a9a3f815aa149c1bd322d41b2aca73d1d4d6760 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 13 Feb 2015 14:39:58 +0000 Subject: [PATCH] =?UTF-8?q?for=20tabs=20that=20include=20the=20parent=20ta?= =?UTF-8?q?b=20prefixed=20to=20them=20(=E2=80=98wpar=E2=80=99=20in=20tab?= =?UTF-8?q?=20format),=20do=20this=20even=20if=20there=20are=20non-sequent?= =?UTF-8?q?ial=20steps=20in=20between=20this=20&=20step=20whose=20tab=20is?= =?UTF-8?q?=20to=20be=20used=20(use=20SkipNonSeqTabWithPar=20format=20flag?= =?UTF-8?q?=20to=20only=20do=20for=20WCN1).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 76409c30..1f8c24d5 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -3343,8 +3343,27 @@ namespace VEPROMS.CSLA.Library parentTab = parentTab.Replace(".0", ""); // this was added in, remove for substeps. tbformat = parentTab + (parentTab.EndsWith(".") ? "" : ".") + tbformat.TrimStart(); } - } + else if (IsSequential && ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.SkipNonSeqTabWithPar) + { + // this was added for Wolf Creek WCN1: if this has a 'wpar' flag, then walk up until finding + // a sequential or high and use that tab (ignore non-sequential steps when walking up parents). + // Note that the format flag 'SkipNonSeqTabWithPar' was added to prevent this code being run for Westinghouse and Farley. + // the following prevents the concatenation of parent tabs onto this once the indenting is + // past the number of seqtabs. + if (localPrintLevel < seqtabs.Count || (PrintLevel < seqtabs.Count && seqtabs[PrintLevel].TabToken.ToUpper().Contains("WPAR"))) + { + ItemInfo mpar = myparent; + while (mpar != null && !mpar.IsSection && !mpar.IsHigh && !mpar.IsSequential) mpar = (mpar.MyParent as ItemInfo); + if (mpar != null && !mpar.IsSection) + { + parentTab = mpar.MyTab.CleanText.Trim(); + tbformat = parentTab + (parentTab.EndsWith(".") ? "" : ".") + tbformat.TrimStart(); + //if (_MyLog.IsInfoEnabled) _MyLog.InfoFormat("==>PARTAB: [{0}]", ShortPath + ", " + ItemID.ToString()); + } + } + } + } if (tbformat.IndexOf("#2#") > -1 || tbformat.IndexOf("#1#") > -1) {