Compare commits

...

3 Commits

Author SHA1 Message Date
aa160b2036 Merge pull request 'Development' (#124) from Development into master
Merging B2023-099 from development into master after successful testing.
2023-09-28 15:58:27 -04:00
42dea70a80 Merge pull request 'B2023-099 Restore the original calculation for finding he center point of the procedure and section END messages.' (#123) from GeneralDebugging into Development
no code review needed being code causing the bug was simply backed out and the original logic was restored.
2023-09-28 14:26:40 -04:00
7ecc3e578f B2023-099 Restore the original calculation for finding he center point of the procedure and section END messages. 2023-09-28 14:17:47 -04:00

View File

@ -2339,7 +2339,10 @@ namespace Volian.Print.Library
{ // Center the bottom message { // Center the bottom message
float wtpm = (float)docstyle.Layout.PageWidth - (float)docstyle.Layout.LeftMargin; float wtpm = (float)docstyle.Layout.PageWidth - (float)docstyle.Layout.LeftMargin;
//B2022-126 was using the wrong font definition to calaculate the centering position //B2022-126 was using the wrong font definition to calaculate the centering position
xpos = XOffsetBox + (float)docstyle.Layout.LeftMargin + (wtpm - (myMsg.Length * docstyle.End.Font.CharsToTwips)) / 2; // ** B2023-099 commented out and restored the previous calculation. This caused problems centering the END message in Ginna
// their END message prints with the Prestige Elite font but he centering calc uses Courier New
//xpos = XOffsetBox + (float)docstyle.Layout.LeftMargin + (wtpm - (myMsg.Length * docstyle.End.Font.CharsToTwips)) / 2;
xpos = XOffsetBox + (float)docstyle.Layout.LeftMargin + (wtpm - (myMsg.Length * MyItemInfo.FormatStepData.Font.CharsToTwips)) / 2;
xpos = Math.Max(xpos, XOffsetBox + (float)docstyle.Layout.LeftMargin); xpos = Math.Max(xpos, XOffsetBox + (float)docstyle.Layout.LeftMargin);
vlnText vttmp = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font); vlnText vttmp = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font);
MyPageHelper.BottomMessage.Add(vttmp); MyPageHelper.BottomMessage.Add(vttmp);