From 885153e3056c701fbbe96b612c3ab68cdb05b509 Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 17 Feb 2020 13:23:40 +0000 Subject: [PATCH] B2020-017: If editing step after approval with a blank change id, a change bar w/ previous change id prints --- PROMS/Volian.Controls.Library/RTBItem.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PROMS/Volian.Controls.Library/RTBItem.cs b/PROMS/Volian.Controls.Library/RTBItem.cs index 70d6febc..3cc259ec 100644 --- a/PROMS/Volian.Controls.Library/RTBItem.cs +++ b/PROMS/Volian.Controls.Library/RTBItem.cs @@ -778,6 +778,7 @@ namespace Volian.Controls.Library if (!MyStepRTB.ActiveMode) return; if (MyStepRTB.IsExperimenting) return; if (MyStepRTB.MyItemInfo.MyContent.Number != null && !MyStepRTB.IsDirty && MyStepRTB.Text.Contains("(Resolved Transition Text)") == false) return; + bool hasChangeBar = MyStepRTB.MyItemInfo.HasChangeBar; bool success = MyStepRTB.OrigDisplayText.Save((RichTextBox)MyStepRTB); if (success) { @@ -794,6 +795,16 @@ namespace Volian.Controls.Library sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId; //if (MyStepRTB.MyItemInfo.MyConfig == null) itm.MyContent.Config = sc.ToString(); } + // B2020-017: If making an editorial change, clear the Change id. Having the change id on + // was adding/printing a change bar. + if (MyStepRTB.MyItemInfo.IsStep && + MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds + && this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange + && hasChangeBar == false) + { + if (sc == null) sc = new StepConfig(); + sc.Step_ChangeID = null; + } // B2015-024 Have Spell Checker text changes be an editorial change (not assign a change bar but keep existing change bar) if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck) {