Fixed crash on double click of usage list item

Fix missing end message if continuous section.
This commit is contained in:
2012-07-10 13:24:51 +00:00
parent 73084c36eb
commit 2812d5b9d7
4 changed files with 20 additions and 10 deletions

View File

@@ -61,7 +61,16 @@ namespace Volian.Print.Library
{
if (yLocation < yTopMargin) // continuous section
{
if (ChildrenBelow == null || ChildrenBelow.Count == 0) return 0;
if (ChildrenBelow == null || ChildrenBelow.Count == 0)
{
// see if there is an end message. This is stored in the helper - if there is,
// we need to be sure that there is room for it.
if (MyPageHelper.BottomMessage != null)
{
if (mySize + yEndMsg <= yWithinMargins) return 1;
}
return 0;
}
vlnParagraph firstChild = ChildrenBelow[0];
// This is a continuous section. There may be cases where the user put a manual page

View File

@@ -707,6 +707,12 @@ namespace Volian.Print.Library
}
else
{
if (_MyHelper.BottomMessage != null)
{
_MyHelper.DrawBottomMessage(cb);
localYPageStart += 12;
myParagraph.YBottomMost += 24; // two lines.
}
float tmplocal = localYPageStart;
_NoBreakYOffset = myParagraph.YBottomMost;
float yOffset = localYPageStart - yTopMargin;