Added supporting logic to SaveText and SaveContents for Editorial Spell Checker

Added supporting logic to SpellCheckNext for Editorial Spell Checker
Save text changes before starting up the spell checker
Added supporting logic to UpdateEditor for Editorial Spell Checker
This commit is contained in:
2016-10-25 18:48:14 +00:00
parent 2342de91bd
commit 91da0b995f
4 changed files with 26 additions and 3 deletions

View File

@@ -754,9 +754,13 @@ namespace Volian.Controls.Library
else
SaveText();
SaveConfig(); // This may be redundant
StepRTB.DidEditorialSpellCheck = false;
if (StepRTB.MySpellCheckDlg != null)
StepRTB.MySpellCheckDlg.DidCorrectSpelling = false;
}
public void SaveText()
{
bool existingChangeBar = MyStepRTB.MyItemInfo.HasChangeBar;
if (MyStepRTB.ReadOnly) return;
if (!MyStepRTB.ActiveMode) return;
if (MyStepRTB.IsExperimenting) return;
@@ -777,6 +781,18 @@ namespace Volian.Controls.Library
sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId;
//if (MyStepRTB.MyItemInfo.MyConfig == null) itm.MyContent.Config = sc.ToString();
}
// 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)
{
if (StepRTB.DidEditorialSpellCheck)
{
if (sc == null) sc = new StepConfig();
sc.Step_SpellCheckerChangedText = (existingChangeBar) ? "KeepChangeBar" : "NoChangeBar";
}
else if (sc != null)
sc.Step_SpellCheckerChangedText = null; // clear spell checker changed text flag B2015-024
}
// 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