From 1979f4b4a02a0617aff520e1bb40fb5826d1bab7 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 17 Apr 2014 18:47:38 +0000 Subject: [PATCH] If pagination is being changed to keep OR steps in the RNO together, when they will be kept together anyway, don't change the pagination. --- PROMS/Volian.Print.Library/Pagination.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index ce6b5aef..ffc7eab9 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -385,6 +385,19 @@ namespace Volian.Print.Library } // Make sure that the FirstPiece (Caution Note HLS and First Substeps) fit float myFirstPieceSize = GetFirstPieceSize(); //Case 0 + // the following logic was added to fix Pagination for VCS BDMG1 Step 4 + if (ChildrenRight.Count > 0 && ChildrenRight[0].YOffset == YOffset) + { + float myFirstPieceRNOSize = 0; + myFirstPieceRNOSize = ChildrenRight[0].GetFirstPieceSize(); + if(myFirstPieceRNOSize < ySpaceOnCurPage) + if (ChildrenBelow.Count > 0) + { + float myFirstPieceAERSize = ChildrenBelow[0].GetFirstPieceSize() + ChildrenBelow[0].YOffset - YOffset; + if (myFirstPieceAERSize < myFirstPieceRNOSize) + myFirstPieceSize = myFirstPieceAERSize; + } + } if (myFirstPieceSize < ySpaceOnCurPage) yLowerLimit = Math.Max(myFirstPieceSize + yStart, yLowerLimit); //while ((YSize - yTop) >= ySpaceOnCurPage) // Pagination Fix Break1LineShort3b