From 792fede0905e400d90e5cd3c98b91e4e40999640 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 4 Nov 2014 11:56:37 +0000 Subject: [PATCH] Calvert: fix extra blank lines around single caution/notes (for Calvert formats only) --- PROMS/Volian.Print.Library/vlnParagraph.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 9d9cee89..b919e665 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -3305,16 +3305,16 @@ namespace Volian.Print.Library int everyNLines = MyItemInfo.FormatStepData == null ? 1 : MyItemInfo.FormatStepData.StepLayoutData.EveryNLines ?? 1; if (everyNLines == -99) return 0; if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || - (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && (MyItemInfo.MyTab!= null && MyItemInfo.MyTab.CleanText != string.Empty))) + (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && MyItemInfo.IsStep && MyItemInfo.FormatStepData.StepLayoutData.STBoxindex != null)) { - if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn - && (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) - && (MyItemInfo.GetNextItem() == null || MyItemInfo.MyContent.Type != MyItemInfo.GetNextItem().MyContent.Type)) return 0; + if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn + && (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) + && (MyItemInfo.GetNextItem() == null || MyItemInfo.MyContent.Type != MyItemInfo.GetNextItem().MyContent.Type)) return 0; if (everyNLines == 99 && MyItemInfo.GetNextItem() == null) - { - if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0; - if (MyItemInfo.MyParent.GetNextItem() != null && MyItemInfo.MyParent.GetNextItem().MyContent.Type == MyItemInfo.MyContent.Type) return 0; - } + { + if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0; + if (MyItemInfo.MyParent.GetNextItem() != null && MyItemInfo.MyParent.GetNextItem().MyContent.Type == MyItemInfo.MyContent.Type) return 0; + } } if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.GetNextItem() == null) return SixLinesPerInch; // Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet.