B2017-059 only turn on the spellchecking if the RTB is visible

This commit is contained in:
2017-04-17 15:42:31 +00:00
parent f5c4d24cf7
commit 9a52e89fd5
3 changed files with 50 additions and 5 deletions

View File

@@ -105,10 +105,22 @@ namespace Volian.Controls.Library
{
// fire load event
base.OnLoad(e);
//AddHandle();
// show first error (after firing load event)
ErrorIndex = 0;
}
// added for debugging - comment out when not using
//public void AddHandle()
//{
// if (!Handles.Contains(this.Handle))
// {
// GC.Collect();
// Handles.Add(this.Handle);
// Console.WriteLine("Handles {0}, RTB Count Created {1}, RTB Count Not Disposed = {2} ", Handles.Count,StepRTB.CountCreated,StepRTB.CountNotDisposed);
// }
//}
//private static List<IntPtr> Handles = new List<IntPtr>();
private bool _Initializing = false;
private string _OrgWord;
@@ -257,6 +269,7 @@ namespace Volian.Controls.Library
private void btnIgnoreAll_Click(object sender, EventArgs e)
{
//Console.WriteLine("handle: {0}", this.Handle);
_Spell.IgnoreList.Add(CurrentError.Text);
_Errors = _Spell.CheckText(_Editor.Text, CurrentError.Start);
UpdateCurrentError();