diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 13d6d224..e6421411 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -4595,11 +4595,27 @@ namespace VEPROMS.CSLA.Library } else { - macroindx = tbformat.IndexOf("{!C"); + macroindx = tbformat.IndexOf("{!C"); // does the step tab use a print macro (i.e. circle around step number) if (macroindx > -1) { + // F2022-051 use the MacroEditTab when set on step that uses a print macro (i.e. circle, triangle) + // this will allow for a visual indicator while editing + // Note could have modified logic for clock macro (above) but older logic uses the IdentEdit setting + // for CAS (Continuous Action Summary steps) that have a circle printed around the step number + // this is the least impact of current code/formats + if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag)) + { + int eidx = tbformat.IndexOf("}", macroindx); + if (eidx > -1) + { + int macrolen = eidx - macroindx + 1; + cltext = cltext == null ? tbformat.Remove(macroindx, macrolen) : cltext.Remove(macroindx, macrolen); + cltext = cltext + " "; + cltext = cltext.Substring(0, macroindx) + FormatStepData.TabData.MacroEditTag + cltext.Substring(macroindx); + } + } // C2017-026: have visual indicator for CAS Step - if (FormatStepData.TabData.IdentEdit.Contains("*. ")) + else if (FormatStepData.TabData.IdentEdit.Contains("*. ")) { cltext = cltext == null ? tbformat.Substring(0, macroindx) + "*. " + tbformat.Substring(macroindx + 8) : cltext.Remove(macroindx, 5); }