F2022-051 put an indicator on the edit screen for the Continuous Action and Immediate Action steps.

This commit is contained in:
John Jenko 2022-11-04 19:28:15 +00:00
parent 7bed151447
commit 7f683c98ce

View File

@ -4595,11 +4595,27 @@ namespace VEPROMS.CSLA.Library
} }
else 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) 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 // 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); cltext = cltext == null ? tbformat.Substring(0, macroindx) + "*. " + tbformat.Substring(macroindx + 8) : cltext.Remove(macroindx, 5);
} }