diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs index d6f60572..5fc5bd8a 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs @@ -343,8 +343,8 @@ namespace VEPROMS.CSLA.Library public ItemInfo InsertSiblingBefore(string text, string number,int? type) { ItemInfo tmp = null; - if (!IsSection && (FormatStepData.UseSmartTemplate || (MyHLS!=null && MyHLS.FormatStepData.UseSmartTemplate) || FormatStepData.UseOldTemplate)) - tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.Before, (int)MyContent.Type); + if (!IsSection && (FormatStepData.UseSmartTemplate || (MyHLS != null && MyHLS.FormatStepData.UseSmartTemplate) || FormatStepData.UseOldTemplate)) + tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.Before, (int)((type == null) ? MyContent.Type : type)); // B2018-051 use the type passed in instead of current step type if (tmp == null) tmp = NewItemInfoFetch(ItemID, EAddpingPart.Before, number, text, type, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID); @@ -688,7 +688,7 @@ namespace VEPROMS.CSLA.Library { ItemInfo tmp = null; if (!IsSection && (FormatStepData.UseSmartTemplate || (MyHLS != null && MyHLS.FormatStepData.UseSmartTemplate) || FormatStepData.UseOldTemplate)) - tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.After, (int)MyContent.Type); + tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.After, (int)((type == null)? MyContent.Type : type)); // B2018-051 use the type passed in instead of current step type if (tmp == null) tmp = NewItemInfoFetch(ItemID, EAddpingPart.After, number, text, type, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID); // if next exists, it is updated in SQL so we have to manually force the iteminfo updates diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index d0cac8f9..5cfb1be1 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -360,7 +360,10 @@ namespace VEPROMS.CSLA.Library } // some plants (Wolf Creek, Turkey Point) have two line titles in their templates with "[(0014])" representing the hard return in the title if (stmp != null) + { stmp = stmp.Replace("[(0014])", "\\line "); // Hard Return + stmp = stmp.Replace("\xFFFD", @"\u160?"); // Hard Space B2018-052 replace old(from 16-bit) hardspace character with the unicode hardspace character + } TPlate tp = new TPlate(level, type, start, width, row, nocol, stmp); _Templates.Add(tp); cnt++;