B2019-111 Keep table with parent when page breaks in RNO

This commit is contained in:
Rich
2019-08-06 21:30:41 +00:00
parent d9b89a4233
commit 344f645b0c
2 changed files with 89 additions and 34 deletions

View File

@@ -1639,15 +1639,35 @@ namespace Volian.Print.Library
//}
public float TableSpaceAvailable// RHM20150525 - Table Scrunch
{
get
get // B2019-111 Keep AER Table with parent when RNO extends passt the end of the page.
{
float retval = 0;
if(_ChildrenBelow!= null)
float tsa = 0;
float tsaRight = 0;
float btm = YBottom;
float btmRight = 0;
if (_ChildrenRight != null && _ChildrenRight.Count > 0)
{
tsaRight = _ChildrenRight[0].TableSpaceAvailable;
btmRight = _ChildrenRight[0].YBottomPagination;
}
if (_ChildrenBelow != null && _ChildrenBelow.Count > 0)
{
foreach (vlnParagraph pgh in _ChildrenBelow)
retval = pgh.TableSpaceAvailable;
tsa = pgh.TableSpaceAvailable;
vlnParagraph pLast = ChildrenBelow[ChildrenBelow.Count - 1];
btm = pLast.YBottomPagination;
//if(MyItemInfo.InList(559839))
// Console.WriteLine("Here");
}
if (MyGrid != null)
retval = MyGrid.SpaceAvailable + MyGrid.LeadingSpaceAvailable;
return retval;
tsa = MyGrid.SpaceAvailable + MyGrid.LeadingSpaceAvailable;
if (btmRight != 0)
{
//_MyLog.WarnFormat("Item={00}, B={1} BR={2} T={3} TR={4}",MyItemInfo.ItemID , btm, btmRight, tsa, tsaRight);
if (btm < btmRight)
tsa = tsaRight;
}
return tsa;
}
}
}