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.
This commit is contained in:
Rich 2016-06-14 17:15:03 +00:00
parent 4ae5fdf980
commit c67d516743

View File

@ -837,7 +837,8 @@ namespace Volian.Controls.Library
private bool _ContextMenuStripChanged = false; private bool _ContextMenuStripChanged = false;
private void StepRTB_MouseDown(object sender, MouseEventArgs e) 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); //Console.WriteLine("vvvvvvvvvv StepRTB Mouse Down id= {0}",MyItemInfo.ItemID);
bool inPsi = this.Parent.FindForm().Name.Contains("frmPSI"); bool inPsi = this.Parent.FindForm().Name.Contains("frmPSI");
if (!_ContextMenuStripChanged) if (!_ContextMenuStripChanged)
@ -1039,6 +1040,10 @@ namespace Volian.Controls.Library
set { _LastRtf = value; } set { _LastRtf = value; }
} }
private bool _lastReadOnly = false; 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) private void AddRtfText(string txt)
{ {
//Console.WriteLine("ItemID:{0}", MyItemInfo.ItemID); //Console.WriteLine("ItemID:{0}", MyItemInfo.ItemID);