From c67d51674371de58d6edb7d8352100bcb88a7d84 Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 14 Jun 2016 17:15:03 +0000 Subject: [PATCH] When the mouse button is pressed on a step edit window, the focus is immediately set to that item. Debug info for the StepRTB was improved. --- PROMS/Volian.Controls.Library/StepRTB.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 81b07bd4..9725eac1 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -837,7 +837,8 @@ namespace Volian.Controls.Library private bool _ContextMenuStripChanged = false; private void StepRTB_MouseDown(object sender, MouseEventArgs e) { - + //The following line fixes bugs B2016-121 and B2016-146 + if(!Focused)this.Focus();// If it doesn't have focus, set focus to the selected item //Console.WriteLine("vvvvvvvvvv StepRTB Mouse Down id= {0}",MyItemInfo.ItemID); bool inPsi = this.Parent.FindForm().Name.Contains("frmPSI"); if (!_ContextMenuStripChanged) @@ -1039,6 +1040,10 @@ namespace Volian.Controls.Library set { _LastRtf = value; } } private bool _lastReadOnly = false; + public override string ToString() + { + return string.Format("[StepRTB {0},{1},{2}]", MyItemInfo.ItemID, MyItemInfo.DisplayNumber, MyItemInfo.DisplayText); + } private void AddRtfText(string txt) { //Console.WriteLine("ItemID:{0}", MyItemInfo.ItemID);