diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 1d7aed22..9f7e2da0 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -324,6 +324,14 @@ namespace VEPROMS.CSLA.Library #region ItemInfo public partial class ItemInfo:IVEDrillDownReadOnly { + public void SetHeader(VE_Font myFont, string myText) + { + _MyHeader = new MetaTag(myFont); + _TagsSetup = true; + _MyHeader.CleanText = myText; + _MyHeader.Text = myText; + _MyHeader.Justify = ContentAlignment.MiddleCenter; + } public void MoveItem(IVEDrillDownReadOnly pInfo, int index) { using (ItemInfoList movedItems = ItemInfoList.GetMoveItem(ItemID, index)) @@ -2856,8 +2864,20 @@ namespace VEPROMS.CSLA.Library { if (MyPrevious != null) { - if(tbformat == prevTbFormat) - _MyHeader = null; + if (tbformat == prevTbFormat) + { + if (MyPrevious.FormatStepData.TabData.IsTransition) + { + if (tbformat != nextTbFormat) + { + tbformat = ""; + _MyHeader = null; + return tbformat; + } + } + else + _MyHeader = null; + } } tbformat = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; TabToIdentBAdjustFont(); @@ -2872,6 +2892,8 @@ namespace VEPROMS.CSLA.Library tbformat = tbformat + ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB; TabToIdentBAdjustFont(); } + else if (FormatStepData.TabData.IsTransition) + return tbformat; // else if this has a next else if (tbformat != null && NextItem != null && !FormatStepData.AlwaysTab && (!FormatStepData.MixCautionsAndNotes || diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs index 504bcb5c..41667fe6 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs @@ -596,6 +596,7 @@ namespace VEPROMS.CSLA.Library return true; // (tb.TextAdded = true); } string parenstr = tb._ToItem.MyProcedure.MyContent.Text; + parenstr = parenstr.Replace("\\LINE ", " ").Replace("\r\n", " "); StringBuilder lretstr = new StringBuilder(); // LATER: For an else - Do I need to strip underlining here? See promsnt\lib\edit\gettran.c if (parenstr != "" || tb._FormatData.ProcData.PrintNoTitle) @@ -714,7 +715,7 @@ namespace VEPROMS.CSLA.Library // check for transition that goes to a procedure step section with title of 'Procedure steps' followed // by ', Step'. This should output as 'Procedure step xyz' rather than 'Procedure steps, step xyz' // TODO: NEED TO USE A FORMAT VARIABLE TO CONTROL THE FOLLOWING - if (tb._ToItem.ActiveFormat.Name.StartsWith("OHLP") && !tb._TransFormat.Contains("{Last Step}") && tb.Prefix != null && tb.Prefix.ToUpper().Contains(", STEP") && tb.ToString().ToUpper().EndsWith("PROCEDURE STEPS")) + if ((tb._FormatData.TransData.AdjustStepTransitionText || tb._ToItem.ActiveFormat.Name.StartsWith("OHLP")) && !tb._TransFormat.Contains("{Last Step}") && tb.Prefix != null && tb.Prefix.ToUpper().Contains(", STEP") && tb.ToString().ToUpper().EndsWith("PROCEDURE STEPS")) { tb.Remove(tb.Length - 15, 15); // remove "procedure steps" tb.Append("procedure Step");