diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 658ee16a..94ef55cf 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -2783,7 +2783,7 @@ namespace VEPROMS.CSLA.Library } return ActiveSection.MyTab.CleanText.TrimEnd(); } - + private string CheckNoteCautionTab(string tbformat) { string prevTbFormat = null; @@ -2843,8 +2843,31 @@ namespace VEPROMS.CSLA.Library ((prevTbFormat != tbformat && (NextItem.MyContent.Type == (int)(MyContent.Type % 10000)))))) { tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; + //string bstr = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; + //int bstrlen = bstr.Length; + //string tstr = tbformat.Substring(tbformat.Length - bstrlen); + //bool good = true; + //for (int i = 0; i < tstr.Length; i++) + // good = (tstr[i] == ' '); + //if (good) + // tbformat = tbformat.Substring(0, tbformat.Length - bstrlen) + bstr; + //else + // tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; if (TabToIdentBAdjustFont()) - _MyTab.RemovedStyleUnderline = true; + _MyTab.RemovedStyleUnderline = true; + } + // Since we append the bullet (IdentB) to the Caution or Note tab (like in 16-bit code) + // we need to append blank characters when there is only one Note or Caution (thus no bullet) + // in order for the Note or Caution tab to consistantly print at the same horizontal location + else if (tbformat != null && !FormatStepData.AlwaysTab && !FormatStepData.MixCautionsAndNotes + && (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB != null + && ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB.Length > 0)) + { + int identBLen = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB.Length; + string bbstr = new string(' ', identBLen); + tbformat = tbformat + bbstr; + if (TabToIdentBAdjustFont()) + _MyTab.RemovedStyleUnderline = true; } return tbformat; }