Bug fix B2015-147 – use HideSelection instead of inserting Highlight on/off which was putting in additional color table information and, in general did not clean up after turning highlighting off.
This commit is contained in:
parent
3deeeb429e
commit
ad1358d77e
@ -621,8 +621,6 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
get { return _PnlCaret; }
|
||||
}
|
||||
private Color _OldForeColor = Color.Empty;
|
||||
private Color _OldBackColor = Color.Empty;
|
||||
public void ShowCaret()
|
||||
{
|
||||
if (_MyStepRTB != null)
|
||||
@ -647,18 +645,7 @@ namespace Volian.Controls.Library
|
||||
tmrCaret.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_MyStepRTB.SelectionColor != Color.Empty && _OldForeColor == Color.Empty)
|
||||
{
|
||||
_OldForeColor = _MyStepRTB.SelectionColor;
|
||||
_MyStepRTB.SelectionColor = Color.White;
|
||||
}
|
||||
if (_MyStepRTB.SelectionBackColor != Color.Empty && _OldBackColor == Color.Empty)
|
||||
{
|
||||
_OldBackColor = _MyStepRTB.SelectionBackColor;
|
||||
_MyStepRTB.SelectionBackColor = Color.FromName("Highlight");
|
||||
}
|
||||
}
|
||||
_MyStepRTB.HideSelection = false; // bug fix B215-147 we used to insert a highlight command - caused issues with IsDirty() where false dirtyness was reported
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -672,18 +659,7 @@ namespace Volian.Controls.Library
|
||||
PnlCaret.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_OldForeColor != Color.Empty)
|
||||
{
|
||||
_MyStepRTB.SelectionColor = _OldForeColor;
|
||||
_OldForeColor = Color.Empty;
|
||||
}
|
||||
if (_OldBackColor != Color.Empty)
|
||||
{
|
||||
_MyStepRTB.SelectionBackColor = _OldBackColor;
|
||||
_OldBackColor = Color.Empty;
|
||||
}
|
||||
}
|
||||
_MyStepRTB.HideSelection = true; // bug fix B215-147 we used to insert a highlight command - caused issues with IsDirty() where false dirtyness was reported
|
||||
}
|
||||
}
|
||||
private void tmrCaret_Tick(object sender, EventArgs e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user