From eaca5be98f4c32efed64939c25915f75154c00b0 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 13 May 2015 17:21:49 +0000 Subject: [PATCH] Logic to treat Caution/Note types as being unique so that for example, multiple notes of different types will not get bulleted. --- .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index aba08430..0077bc9e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -3857,8 +3857,15 @@ namespace VEPROMS.CSLA.Library // If this has a previous, and the tabs of this & previous match if (tbformat != null && MyPrevious != null && !FormatStepData.AlwaysTab && (!FormatStepData.MixCautionsAndNotes || (tbformat == prevTbFormat))) { - tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; - TabToIdentBAdjustFont(); + // used in Ginna's Attachment format + // only create bullets for multiple cautions and notes if they are all exactly the same type + if (!ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.OnlyBulletSameCautionNoteType || + (MyPrevious != null && MyPrevious.MyContent.Type == MyContent.Type) || + (NextItem != null && nextItem.MyContent.Type == MyContent.Type)) + { + tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; + TabToIdentBAdjustFont(); + } } else if (FormatStepData.TabData.IsTransition) return tbformat; @@ -3907,6 +3914,13 @@ namespace VEPROMS.CSLA.Library if (MyPrevious != null && MyContent.Type != MyPrevious.MyContent.Type) return false; if (NextItem != null && MyContent.Type != NextItem.MyContent.Type) return false; } + // used in Ginna's Attachment format + // treat cautions and notes as different if they are all NOT exactly the same type + if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.OnlyBulletSameCautionNoteType) + { + if (MyPrevious != null && MyPrevious.MyContent.Type != MyContent.Type) return true; + if (NextItem != null && NextItem.MyContent.Type != MyContent.Type) return true; + } if (!FormatStepData.MixCautionsAndNotes) return false; if (IsNote && ((NextItem != null && NextItem.IsCaution) || (MyPrevious != null && MyPrevious.IsCaution))) return true;