diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 67cd155f..a0572fd2 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -722,6 +722,7 @@ namespace Volian.Print.Library { if (prevCB == null) prevCB = cb; else if (prevCB.YChangeBarBottom > cb.YChangeBarBottom) prevCB = cb; + cb.BottomIsTable = (vcb.MyParent.MyItemInfo.IsTable); } } } @@ -779,19 +780,23 @@ namespace Volian.Print.Library } private bool OverlapOrSpan(vlnChangeBar cb, vlnChangeBar vcb) { + float tolerance = vlnPrintObject.SixLinesPerInch; + if (cb.MyParent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && + (vcb.MyParent.MyItemInfo.IsTable || cb.MyParent.MyItemInfo.IsTable || cb.BottomIsTable)) tolerance *= 1.5f; + if (cb.MyParent.MyItemInfo.MyHLS.ItemID != vcb.MyParent.MyItemInfo.MyHLS.ItemID) return false; // cb.Yoffset is within range of vcb: - if (cb.YOffset <= vcb.YOffset && - cb.YOffset >= (vcb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch)) return true; + if (cb.YOffset <= vcb.YOffset && + cb.YOffset >= (vcb.YChangeBarBottomExtend - tolerance)) return true; // cb.YChangeBarBottom is within range of vcb: - if ((cb.YChangeBarBottomExtend-vlnPrintObject.SixLinesPerInch) <= vcb.YOffset && - cb.YChangeBarBottomExtend >= (vcb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch)) return true; + if ((cb.YChangeBarBottomExtend - tolerance) <= vcb.YOffset && + cb.YChangeBarBottomExtend >= (vcb.YChangeBarBottomExtend - tolerance)) return true; // vcb.Yoffset is within range of cb: if (vcb.YOffset <= cb.YOffset && - vcb.YOffset >= (cb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch)) return true; + vcb.YOffset >= (cb.YChangeBarBottomExtend - tolerance)) return true; // vcb.YChangeBarBottom is within range of cb: - if ((vcb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch) <= cb.YOffset && - vcb.YChangeBarBottomExtend >= (cb.YChangeBarBottomExtend - vlnPrintObject.SixLinesPerInch)) return true; + if ((vcb.YChangeBarBottomExtend - tolerance) <= cb.YOffset && + vcb.YChangeBarBottomExtend >= (cb.YChangeBarBottomExtend - tolerance)) return true; return false; } private PromsPrinter _MyPromsPrinter; diff --git a/PROMS/Volian.Print.Library/vlnChangeBar.cs b/PROMS/Volian.Print.Library/vlnChangeBar.cs index 79a94f17..1b51152b 100644 --- a/PROMS/Volian.Print.Library/vlnChangeBar.cs +++ b/PROMS/Volian.Print.Library/vlnChangeBar.cs @@ -84,6 +84,12 @@ namespace Volian.Print.Library { get {return YChangeBarBottom - YExtendLine; } } + private bool _BottomIsTable = false; + public bool BottomIsTable + { + get { return _BottomIsTable; } + set { _BottomIsTable = value; } + } private bool _IsRev; private bool _MsgAtTop; // flags that message should be drawn at top of change bar public vlnChangeBar(PdfContentByte cb, vlnParagraph parent, float xoff, float yoff, int msgAlignment, bool isRev, bool msgAtTop)