diff --git a/PROMS/Formats/fmtall/wst1all.xml b/PROMS/Formats/fmtall/wst1all.xml index b1b92408..171e75b0 100644 Binary files a/PROMS/Formats/fmtall/wst1all.xml and b/PROMS/Formats/fmtall/wst1all.xml differ diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 78aaae9b..36e7d791 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -3336,6 +3336,9 @@ namespace VEPROMS.CSLA.Library localPrintLevel = PrintLevel + ((ActiveFormat.PlantFormat.FormatData.Express && IsSequential) ? 0 : CurrentSectionLevel()); if (!ActiveFormat.PlantFormat.FormatData.Express) doMeta = true; } + if(sd.StepSectionLayoutData.TieTabToLevel && ActiveFormat.PlantFormat.FormatData.SectData.CountSubSectionsForLevel) + if (SectionLevel() > 1) + localPrintLevel += 1; SeqTabFmtList seqtabs = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.SeqTabFmtList; // Start with basic cases of alpha/numeric/seq: // If we have metasections AND... @@ -3626,6 +3629,17 @@ namespace VEPROMS.CSLA.Library _MyTab.Text = tbformat; _MyTab.CleanText = cltext != null ? cltext : tbformat; } + private int SectionLevel() + { + int level = 0; + ItemInfo ii = this; + while (!ii.IsProcedure) + { + if (ii.IsSection) level++; + ii = ii.ActiveParent as ItemInfo; + } + return level; + } private bool InCaution() { // walk up until procedure level and if finding a caution type, return true, otherwise false. @@ -6353,6 +6367,11 @@ namespace VEPROMS.CSLA.Library [Serializable()] public partial class StepInfo : ItemInfo { + #region StepConfig + private StepConfig _StepConfig; + public StepConfig StepConfig + { get { return (_StepConfig != null ? _StepConfig : _StepConfig = new StepConfig(this)); } } + #endregion #region Tab public override void SetupTags() { diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index b5869528..f59d1c33 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1893,6 +1893,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _UseMetaSections, "@UseMetaSections"); } } + private LazyLoad _CountSubSectionsForLevel; + public bool CountSubSectionsForLevel + { + get + { + return LazyLoad(ref _CountSubSectionsForLevel, "@CountSubSectionsForLevel"); + } + } private LazyLoad _PrintPhoneList; public bool PrintPhoneList { diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 94c08290..b2fa4c76 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -437,9 +437,13 @@ namespace Volian.Print.Library } // TODO - yEndMsg - compressed size? - // ySize7LPI includes a blank line after the step which we don't want to include in the page break test. + // ySize7LPI includes a blank line after the step which we don't want to include in the page break test. else if (!KeepStepsOnPage && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CompressSteps && (mySize7LPI - SixLinesPerInch + yEndMsg - tableSpaceAvailable) < (yPageSizeNextPage * SixLinesPerInch / _SevenLinesPerInch))// RHM20150525 - Table Scrunch + // if this is the first step, then the step has to fit in the space that remains on the page + // otherwise it needs to fit on a blank page + // This was originally (10/12/2015) added for Farley Shared AOP 79 but was found to be unnecessary + //&& (mySize7LPI - SixLinesPerInch + yEndMsg - tableSpaceAvailable) < ((MyItemInfo.MyPrevious == null ? yWithinMargins : yPageSizeNextPage) * SixLinesPerInch / _SevenLinesPerInch))// RHM20150525 - Table Scrunch { // ooooooooo ooooo ooooooooo. ooooo // d"""""""8' `888' `888 `Y88. `888'