Reset the change bar override when the step text is changed and saved.
This commit is contained in:
parent
6732e6c9fc
commit
17a72a4dd7
@ -676,6 +676,7 @@ namespace Volian.Controls.Library
|
|||||||
bool success = MyStepRTB.OrigDisplayText.Save((RichTextBox)MyStepRTB);
|
bool success = MyStepRTB.OrigDisplayText.Save((RichTextBox)MyStepRTB);
|
||||||
if (success)
|
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.
|
// 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
|
// 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.
|
// 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
|
MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds
|
||||||
&& !this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange)
|
&& !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();
|
if (sc == null) sc = new StepConfig();
|
||||||
sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId;
|
sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId;
|
||||||
//if (MyStepRTB.MyItemInfo.MyConfig == null) itm.MyContent.Config = sc.ToString();
|
//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.FindAllLinks();
|
||||||
MyStepRTB.OrigRTF = MyStepRTB.Rtf;
|
MyStepRTB.OrigRTF = MyStepRTB.Rtf;
|
||||||
MyStepRTB.ClearUndo();
|
MyStepRTB.ClearUndo();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user