Use a simpler method to hide the psuedo caret
This commit is contained in:
		| @@ -2932,7 +2932,7 @@ namespace VEPROMS | |||||||
| 		private StepRTB _LastStepRTB = null; | 		private StepRTB _LastStepRTB = null; | ||||||
| 		private void tc_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args) | 		private void tc_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args) | ||||||
| 		{ | 		{ | ||||||
| 			tc.HideCaret(); | 			tc.HideTheCaret(); | ||||||
| 			if (args != null && args.MyEditItem != null && !args.MyEditItem.MyStepPanel.ContainsFocus) return; | 			if (args != null && args.MyEditItem != null && !args.MyEditItem.MyStepPanel.ContainsFocus) return; | ||||||
| 			btnFixMSWord.Visible = (args != null && ( args.MyItemInfo != null && args.MyEditItem == null)); | 			btnFixMSWord.Visible = (args != null && ( args.MyItemInfo != null && args.MyEditItem == null)); | ||||||
| 			if (_LastStepRTB != null && !_LastStepRTB.Disposing && !_LastStepRTB.Closed) | 			if (_LastStepRTB != null && !_LastStepRTB.Disposing && !_LastStepRTB.Closed) | ||||||
|   | |||||||
| @@ -729,15 +729,16 @@ namespace Volian.Controls.Library | |||||||
| 				trackerHC++; | 				trackerHC++; | ||||||
| 			/*	if (trackerHC>20)*/ Console.WriteLine("HideCaret {0}", trackerHC); | 			/*	if (trackerHC>20)*/ Console.WriteLine("HideCaret {0}", trackerHC); | ||||||
| 				//Volian.Base.Library.vlnStackTrace.ShowStack("HideCaret: StepRTB: {0}",  _MyStepRTB.MyItemInfo.ItemID); | 				//Volian.Base.Library.vlnStackTrace.ShowStack("HideCaret: StepRTB: {0}",  _MyStepRTB.MyItemInfo.ItemID); | ||||||
| 				if (_MyStepRTB.SelectionLength == 0) | 				HideTheCaret(); | ||||||
| 				{ | 				if (_MyStepRTB.SelectionLength > 0) | ||||||
| 					tmrCaret.Enabled = false; |  | ||||||
| 					PnlCaret.Visible = false; |  | ||||||
| 				} |  | ||||||
| 				else |  | ||||||
| 					_MyStepRTB.HideSelection = true; // bug fix B215-147 we used to insert a highlight command - caused issues with IsDirty() where false dirtyness was reported | 					_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) | 		private void tmrCaret_Tick(object sender, EventArgs e) | ||||||
| 		{ | 		{ | ||||||
| 			PnlCaret.Visible = !PnlCaret.Visible; | 			PnlCaret.Visible = !PnlCaret.Visible; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Rich
					Rich