Logic to not print end message on single column sections

This commit is contained in:
John Jenko 2014-01-16 22:18:29 +00:00
parent 4701474068
commit 053223bea7
2 changed files with 9 additions and 3 deletions

View File

@ -30,7 +30,10 @@ namespace Volian.Print.Library
{
// Check if paginate on a separate section, if within a section. Top level section pagination happens in PromsPrinter
if (MyItemInfo.IsSection && MyParent != null && MyParent.MyItemInfo.IsSection && (MyItemInfo as SectionInfo).IsSeparatePagination())
return 1;
return 1;
// if the EndForSingle format flag is set to false, then we do not print an End message if the section
// is a single column section.
bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
float yPageSize = yTopMargin - yBottomMargin;
@ -45,7 +48,7 @@ namespace Volian.Print.Library
// line above the end message, thus 2 not 3. This change was made on July 20, 2011 by RHM & KBR. The
// procedure in questions was VEWCNEMG\EMGAPP.PRC, ES-01, Step 8.
bool ManualPageBreak = false;
float yEndMsg = !MyItemInfo.IsSection && MyItemInfo.MyHLS != null && MyItemInfo.MyHLS.NextItem == null && (MyItemInfo.MyDocStyle.End.Message ?? "") != "" ? 2 * SixLinesPerInch : 0;
float yEndMsg = !_skipEndMessage && !MyItemInfo.IsSection && MyItemInfo.MyHLS != null && MyItemInfo.MyHLS.NextItem == null && (MyItemInfo.MyDocStyle.End.Message ?? "") != "" ? 2 * SixLinesPerInch : 0;
// The following code is to fix a pagination issue in SHE. It was decided to not put it into development
// because some of the pagination logic may be redesigned. Without this fix, some pages had a page break

View File

@ -1063,8 +1063,11 @@ namespace Volian.Print.Library
if (MyItemInfo.IsHigh && MyItemInfo.NextItem == null) // last hls, add the 'end' message, if there is one
{
DocStyle docstyle = MyItemInfo.MyDocStyle;
// if the EndForSingle format flag is set to false, then we do not print an End message if the section
// is a single column section.
bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
string myMsg = (docstyle.End == null) ? null : docstyle.End.FixedMessage;
if (myMsg != null)
if (myMsg != null && !_skipEndMessage)
{
// If the flag is 0 or 1, just put the end message out right below this vlnParagraph:
float msg_yLocation = CalculateYLocation(yPageStart - YBottomMost, yTopMargin);