diff --git a/PROMS/Volian.Controls.Library/RTBItem.cs b/PROMS/Volian.Controls.Library/RTBItem.cs index 991c9a30..2bed74d0 100644 --- a/PROMS/Volian.Controls.Library/RTBItem.cs +++ b/PROMS/Volian.Controls.Library/RTBItem.cs @@ -676,6 +676,7 @@ namespace Volian.Controls.Library bool success = MyStepRTB.OrigDisplayText.Save((RichTextBox)MyStepRTB); if (success) { + StepConfig sc = MyStepRTB.MyItemInfo.MyConfig as StepConfig; // if the plant has the change id option, the change id was entered when the program started. // this should be saved for every piece of edited data. Note that the set of config // item Step_MultipleChangeID has the save built in to it. @@ -683,11 +684,17 @@ namespace Volian.Controls.Library MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds && !this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange) { - StepConfig sc = MyStepRTB.MyItemInfo.MyConfig as StepConfig; + //StepConfig sc = MyStepRTB.MyItemInfo.MyConfig as StepConfig; if (sc == null) sc = new StepConfig(); sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId; //if (MyStepRTB.MyItemInfo.MyConfig == null) itm.MyContent.Config = sc.ToString(); } + // We saved changes made to some step text. Reset the change bar override. + // IF there is a step config remove the change bar override by setting the CBOverride value to null + // This fixes a problem reported by Farly where if the change bar or overridden to be off, the next + // time a change was made, the change bar remained turned off. + if (sc != null) + sc.Step_CBOverride = null; // clear the change bar override MyStepRTB.FindAllLinks(); MyStepRTB.OrigRTF = MyStepRTB.Rtf; MyStepRTB.ClearUndo();