C2017-024 logic to trim the height of the hold point type of boxes (Cautions/Notes types) when there is only a hard space type in for the text.

This commit is contained in:
John Jenko 2017-06-05 20:22:09 +00:00
parent fa6cb507d6
commit 51c5cf8d1c

View File

@ -381,6 +381,14 @@ namespace Volian.Print.Library
if (box != null && box.MyBox != null) if (box != null && box.MyBox != null)
{ {
box.Height = yoff - box.YOffset; // new height, with children box.Height = yoff - box.YOffset; // new height, with children
// C2017-024 Wolf Creek wanted a hold point with out text and no extra blank lines in the caution/note box
// so if they put only a hard space in for the text, then we will print the note/caution box with only the tab text
if (box.MyParent.MyItemInfo.MyContent.Text.StartsWith(@"\u160?") && box.MyParent.MyItemInfo.DisplayText.Length == 1)
{
box.Height -= 3 * vlnPrintObject.SixLinesPerInch;
yoff -= vlnPrintObject.SixLinesPerInch;
}
else
yoff += 2 * vlnPrintObject.SixLinesPerInch; yoff += 2 * vlnPrintObject.SixLinesPerInch;
if (lastChild != null && lastChild.FormatStepData.AlwaysUseExtraLines && (lastChild.IsCaution || lastChild.IsNote)) if (lastChild != null && lastChild.FormatStepData.AlwaysUseExtraLines && (lastChild.IsCaution || lastChild.IsNote))
{ {