Use a simpler method to hide the psuedo caret

This commit is contained in:
Rich 2016-02-03 17:15:06 +00:00
parent 0eeac0cb7f
commit 3dde544f71
2 changed files with 8 additions and 7 deletions

View File

@ -2932,7 +2932,7 @@ namespace VEPROMS
private StepRTB _LastStepRTB = null;
private void tc_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args)
{
tc.HideCaret();
tc.HideTheCaret();
if (args != null && args.MyEditItem != null && !args.MyEditItem.MyStepPanel.ContainsFocus) return;
btnFixMSWord.Visible = (args != null && ( args.MyItemInfo != null && args.MyEditItem == null));
if (_LastStepRTB != null && !_LastStepRTB.Disposing && !_LastStepRTB.Closed)

View File

@ -729,15 +729,16 @@ namespace Volian.Controls.Library
trackerHC++;
/* if (trackerHC>20)*/ Console.WriteLine("HideCaret {0}", trackerHC);
//Volian.Base.Library.vlnStackTrace.ShowStack("HideCaret: StepRTB: {0}", _MyStepRTB.MyItemInfo.ItemID);
if (_MyStepRTB.SelectionLength == 0)
{
tmrCaret.Enabled = false;
PnlCaret.Visible = false;
}
else
HideTheCaret();
if (_MyStepRTB.SelectionLength > 0)
_MyStepRTB.HideSelection = true; // bug fix B215-147 we used to insert a highlight command - caused issues with IsDirty() where false dirtyness was reported
}
}
public void HideTheCaret()
{
tmrCaret.Enabled = false;
PnlCaret.Visible = false;
}
private void tmrCaret_Tick(object sender, EventArgs e)
{
PnlCaret.Visible = !PnlCaret.Visible;