B2017-203: missing End message if continuous subsections & 2 sections’ end message on same page

This commit is contained in:
2017-09-12 13:02:48 +00:00
parent 8fd0230aa0
commit c87ec88245
4 changed files with 24 additions and 17 deletions

View File

@@ -2119,7 +2119,7 @@ namespace Volian.Print.Library
{
ShowPageBreak(1, CheckForCompression("PageBreakOnStep/Caution/Note HLS"), "Yes", YTop - YBottomMost, yTopMargin - yBottomMargin, yTopMargin - yBottomMargin, false);
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
MyPageHelper.BottomMessage = null;
MyPageHelper.BottomMessage.Clear();
MyPageHelper.TopMessage = null;
MyPromsPrinter.NewPage();
if (CompressPartOfStep)
@@ -2213,16 +2213,17 @@ namespace Volian.Print.Library
if ((docstyle.End.Margin ?? 0) != 0)
{
xpos = (float)docstyle.Layout.LeftMargin + (float)docstyle.End.Margin;
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font);
MyPageHelper.BottomMessage.Add(new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font));
}
else
{ // Center the bottom message
float wtpm = (float)docstyle.Layout.PageWidth - (float)docstyle.Layout.LeftMargin;
xpos = XOffsetBox + (float)docstyle.Layout.LeftMargin + (wtpm - (myMsg.Length * MyItemInfo.FormatStepData.Font.CharsToTwips)) / 2;
xpos = Math.Max(xpos, XOffsetBox + (float)docstyle.Layout.LeftMargin);
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font);
MyPageHelper.MyGaps.Add(new Gap(msg_yLocation, msg_yLocation - MyPageHelper.BottomMessage.Height));
yPageStart -= (MyPageHelper.BottomMessage.Height + adjMsgY);
vlnText vttmp = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font);
MyPageHelper.BottomMessage.Add(vttmp);
MyPageHelper.MyGaps.Add(new Gap(msg_yLocation, msg_yLocation - vttmp.Height));
yPageStart -= (vttmp.Height + adjMsgY);
}
}
}
@@ -2858,10 +2859,10 @@ namespace Volian.Print.Library
else
xoffB = docstyle.Layout.LeftMargin + docstyle.Continue.Bottom.Margin ?? 0;
//MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Bottom.Margin ?? 0, msg_yLocation, docstyle.Continue.Bottom.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, xoffB, msg_yLocation, docstyle.Continue.Bottom.Font);
MyPageHelper.BottomMessage.Add(new vlnText(cb, this, myMsg, myMsg, xoffB, msg_yLocation, docstyle.Continue.Bottom.Font));
}
}
if (PageBreakOnStep) MyPageHelper.BottomMessage = null;
if (PageBreakOnStep) MyPageHelper.BottomMessage.Clear();
}
private void RefreshDocStyle()