From 0166b06209ab2c308d5b56a8950f565a42b38320 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 27 May 2016 18:24:08 +0000 Subject: [PATCH] =?UTF-8?q?Beefed=20up=20the=20logic=20that=20determines?= =?UTF-8?q?=20if=20we=20need=20to=20strip=20the=20=E2=80=9CS=E2=80=9D=20fr?= =?UTF-8?q?om=20the=20end=20of=20the=20CAUTIOS=20or=20NOTES=20tab.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 7e63e134..f9299e27 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1575,7 +1575,10 @@ namespace VEPROMS.CSLA.Library return includeOnCAS; } } - + public bool IsSameType(ItemInfo cmpItmInfo) + { + return (((int)MyContent.Type) % 10000) == (((int)cmpItmInfo.MyContent.Type) % 10000); + } public bool IsCautionOrNotePart { get @@ -4044,8 +4047,8 @@ namespace VEPROMS.CSLA.Library // if there is only step in the group or we have a change in step type (caution/note) when there is // use of the MixCautionsAndNotes format flag - no bullet is used, if more that one replace the tab // with a bullet. Also, if only one in group and tab text ends with 'S', remove it: - bool mixCandN = MixCautionNotesDiffType(); - if ((MyPrevious == null && (nextItem == null || specialCalvertAlarm)) || mixCandN || FormatStepData.SeparateBox) + bool mixCandN = MixCautionNotesDiffType(); + if (((MyPrevious == null || !this.IsSameType(MyPrevious)) && ((nextItem == null || !this.IsSameType(nextItem)) || specialCalvertAlarm)) || mixCandN || FormatStepData.SeparateBox) { if (_MyHeader.CleanText.ToUpper().EndsWith("S")) {