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

@@ -1796,6 +1796,18 @@ namespace Volian.Controls.Library
}
//static bool _ShowChanges=false;
int _LastTop = 0;
// Bug Fix: B2017-059 only turn on the spellchecking if the RTB is visible. This controls the number of windows handles created durning spellchecking
private void TurnOnSpellCheckIfVisible()
{
if (MyStepRTB != null)
{
if (this.Top + this.Height > 0 && this.Top < MyStepPanel.Height)
MyStepRTB.SpellCheckStatus = true;
else
MyStepRTB.SpellCheckStatus = false;
}
}
/// <summary>
/// Handles movement of the EditItems
/// </summary>
@@ -1803,6 +1815,7 @@ namespace Volian.Controls.Library
/// <param name="e"></param>
private void EditItem_Move(object sender, EventArgs e)
{
TurnOnSpellCheckIfVisible();
int newTop = Top - MyStepPanel.TopMostEditItem.Top;
//if(_ShowChanges && _LastTop != newTop && MyItemInfo.InList(134786))
//Volian.Base.Library.vlnStackTrace.ShowStackLocal(2,10,"\"EditItem_Move\"\t\"\"\t\"{0}\"\t{1}\t{2}\t{3}",MyItemInfo.ShortPath, MyID, Top, _LastTop);