diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 9fe3939c..689a37a6 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -626,10 +626,10 @@ namespace Volian.Controls.Library // if this format has change ids that were added from edit, allow removal of // change ids for this procedure: - FolderInfo fi = FolderInfo.Get(1); - FormatInfo frmI = FormatInfo.Get(fi.FormatID ?? 1); - if (frmI.PlantFormat.FormatData.ProcData.ChangeBarData.ChgBarMessageFromEdit) - cm.MenuItems.Add("Remove Change Ids", new EventHandler(mi_Click)); + //FolderInfo fi = FolderInfo.Get(1); + //FormatInfo frmI = FormatInfo.Get(fi.FormatID ?? 1); + //if (frmI.PlantFormat.FormatData.ProcData.ChangeBarData.ChgBarMessageFromEdit) + // cm.MenuItems.Add("Remove Change Ids", new EventHandler(mi_Click)); cm.MenuItems.Add("New Section", new EventHandler(mi_Click)); if (pri.MyDocVersion.MultiUnitCount > 1) { diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 8f44e952..5a4035eb 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -873,7 +873,7 @@ namespace Volian.Print.Library case 1: // Break on High Level Step OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin); docstyle = MyItemInfo.MyDocStyle; - bool doSectionContinue = ((docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue); + bool doSectionContinue = !MyItemInfo.IsSection && ((docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue); if (doSectionContinue) DoBottomContinueMsg(cb, yBottomMargin, yLocation, docstyle); cb.PdfDocument.NewPage(); //_MyLog.InfoFormat("NewPage 10 {0}", cb.PdfWriter.CurrentPageNumber); @@ -1064,8 +1064,14 @@ namespace Volian.Print.Library //bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle; SectionInfo si = MyItemInfo.MyActiveSection as SectionInfo; bool _skipEndMessage = si.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle; + bool _lastSect = true; + if (si.MyActiveParent.IsSection) // is this meta/subsection. Only put end message out on last section + { + ItemInfo mysect = si as ItemInfo; + if (mysect.GetNextItem() != null) _lastSect = false; + } string myMsg = (docstyle.End == null) ? null : docstyle.End.FixedMessage; - if (myMsg != null && !_skipEndMessage) + if (myMsg != null && !_skipEndMessage && _lastSect) { // If the flag is 0 or 1, just put the end message out right below this vlnParagraph: float msg_yLocation = CalculateYLocation(yPageStart - YBottomMost, yTopMargin); @@ -1241,7 +1247,7 @@ namespace Volian.Print.Library case E_ContBottomLoc.BtwnTextAndBottom2: // Like BtwnTextAndBottom but accounts for line spacing of step & is 1 line up on page (for BGE - Procedure Steps - 2 column) float adj = (!MyItemInfo.IsSection && MyItemInfo.FormatStepData.StepLayoutData.EveryNLines == 1) ? SixLinesPerInch : 0; - msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2) + adj + SixLinesPerInch; + msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2) + adj;// +SixLinesPerInch; if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin; break; default: