Use the TreeView timer to select the newly created step when a step is added from the TreeView. This assures that it will get focus.
Changed OnChange to be called for a specific instance Don't select newly created Step if it was created from the TreeView Adjust the locations of steps properly if a caution or note is deleted Reduce repeated setup of the RTF data in a step Add an event that fires after the Step is added from the TreeView so that the newly created step can get focus
This commit is contained in:
@@ -714,17 +714,25 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
#endregion
|
||||
#region AddRtfTextAndStyles
|
||||
private string _LastRtf = "";
|
||||
private void AddRtfText(string txt)
|
||||
{
|
||||
//Console.WriteLine("ItemID:{0}", MyItemInfo.ItemID);
|
||||
//if(MyItemInfo.ItemID==10256)
|
||||
// Volian.Base.Library.vlnStackTrace.ShowStackLocal("ItemID:{0}", MyItemInfo.ItemID.ToString());
|
||||
StringBuilder selectedRtfSB = new StringBuilder();
|
||||
AddFontTable(selectedRtfSB);
|
||||
_RtfPrefix = selectedRtfSB.ToString();
|
||||
selectedRtfSB.Append(txt);
|
||||
string newRTF = selectedRtfSB.ToString() + "}";
|
||||
SelectAll();
|
||||
if (SelectedRtf != newRTF)
|
||||
SelectedRtf = newRTF;
|
||||
//SelectedRtf = selectedRtfSB.ToString() + "}";
|
||||
string newRtf = selectedRtfSB.ToString() + "}";
|
||||
if(newRtf != _LastRtf)
|
||||
{
|
||||
//Console.WriteLine("ItemID:{0}\r\nOld:'{1}'\r\nNew:'{2}'\r\n", MyItemInfo.ItemID, Rtf, newRtf);
|
||||
this.ContentsResized -=new ContentsResizedEventHandler(StepRTB_ContentsResized);
|
||||
Text = "";
|
||||
this.ContentsResized += new ContentsResizedEventHandler(StepRTB_ContentsResized);
|
||||
SelectedRtf = _LastRtf = newRtf;
|
||||
}
|
||||
FindAllLinks();
|
||||
}
|
||||
private void AddFontTable(StringBuilder selectedRtfSB)
|
||||
|
Reference in New Issue
Block a user