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:
@@ -1219,21 +1219,21 @@ namespace Volian.Controls.Library
|
||||
/// </summary>
|
||||
public void AddSiblingAfter()
|
||||
{
|
||||
AddSiblingAfter("");
|
||||
AddSiblingAfter("",true);
|
||||
}
|
||||
public void AddSiblingAfter(string text)
|
||||
public void AddSiblingAfter(string text,bool updateStatus)
|
||||
{
|
||||
MyStepRTB.SaveText();
|
||||
ItemInfo newItemInfo = MyItemInfo.InsertSiblingAfter(text);
|
||||
DoAddSiblingAfter(newItemInfo);
|
||||
DoAddSiblingAfter(newItemInfo, updateStatus);
|
||||
}
|
||||
public void AddSiblingAfter(int? type)
|
||||
public void AddSiblingAfter(int? type, bool updateStatus)
|
||||
{
|
||||
MyStepRTB.SaveText();
|
||||
ItemInfo newItemInfo = MyItemInfo.InsertSiblingAfter("","",type);
|
||||
DoAddSiblingAfter(newItemInfo);
|
||||
DoAddSiblingAfter(newItemInfo,updateStatus);
|
||||
}
|
||||
private void DoAddSiblingAfter(ItemInfo newItemInfo)
|
||||
private void DoAddSiblingAfter(ItemInfo newItemInfo, bool updateStatus)
|
||||
{
|
||||
StepItem newStepItem = null;
|
||||
switch (_MyChildRelation)
|
||||
@@ -1251,14 +1251,15 @@ namespace Volian.Controls.Library
|
||||
break;
|
||||
}
|
||||
//StepItem newStepItem = ActiveParent.AddChildAfter(newItemInfo, );
|
||||
_MyStepPanel.SelectedStepRTB = newStepItem.MyStepRTB;//Update Screen
|
||||
if(updateStatus)
|
||||
_MyStepPanel.SelectedStepRTB = newStepItem.MyStepRTB;//Update Screen
|
||||
}
|
||||
private static int _WatchThis = 1;
|
||||
public void AddSiblingBefore()
|
||||
{
|
||||
AddSiblingBefore("");
|
||||
AddSiblingBefore("",true);
|
||||
}
|
||||
public void AddSiblingBefore(string text)
|
||||
public void AddSiblingBefore(string text, bool updateSelection)
|
||||
{
|
||||
// Save RTB text before creating a new item because the process of creating
|
||||
// a new item will save a change to iteminfo excluding text changes. This
|
||||
@@ -1283,7 +1284,8 @@ namespace Volian.Controls.Library
|
||||
default: // Need debug
|
||||
break;
|
||||
}
|
||||
_MyStepPanel.SelectedStepRTB = newStepItem.MyStepRTB;//Update Screen
|
||||
if(updateSelection)
|
||||
_MyStepPanel.SelectedStepRTB = newStepItem.MyStepRTB;//Update Screen
|
||||
}
|
||||
public void AddChild(E_FromType fromType, int type)
|
||||
{
|
||||
|
Reference in New Issue
Block a user