diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 9d0e629c..7ecdc496 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -920,6 +920,22 @@ namespace Volian.Print.Library doSectTab = true; if (itemInfo.IsStepSection && formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Just == "PSLeft") { + // NegPageItems stores pagelist items with a negative row and checkoff header tokens. + // If they exist, they are actually put out by the section title. If the section + // is the first on the page, put it out one line above, otherwise, it gets put out + // on the same line as section title. + if (MyPageHelper.NegPageItems != null && MyPageHelper.NegPageItems.Count > 0) + { + if (MyPageHelper.NegPageItems.ContainsKey(itemInfo as SectionInfo)) + { + CheckOffHeaderHelper hlp = MyPageHelper.NegPageItems[itemInfo as SectionInfo]; + // if this section is first section on page, put the checkoff on line above + // current line, otherwise put it on same line as section title. + float chkOffY = yoff == 0 ? yoff - SixLinesPerInch : yoff; + vlnText myCOHead = new vlnText(cb, this, hlp.SvgText.Text, hlp.SvgText.Text, hlp.SvgText.X.Value + (float)MyItemInfo.MyDocStyle.Layout.LeftMargin, chkOffY, hlp.CheckOffHeaderFont); + PartsRight.Add(myCOHead); + } + } float offset = (float)itemInfo.MyDocStyle.Layout.LeftMargin; if (formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos != null) offset += (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos;