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:
Rich
2010-12-02 22:23:50 +00:00
parent d01b27c80d
commit 5b70652cb4
8 changed files with 80 additions and 34 deletions

View File

@@ -363,7 +363,7 @@ namespace Volian.Controls.Library
}
return false;
}
public bool InsertStepItem(ItemInfo myItemInfo, string text, E_InsertType insertType, E_FromType fromType, int type)
public bool InsertStepItem(ItemInfo myItemInfo, string text, E_InsertType insertType, E_FromType fromType, int type,bool updateSelection)
{
CleanUpClosedItems();
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
@@ -378,10 +378,10 @@ namespace Volian.Controls.Library
switch (insertType)
{
case E_InsertType.Before:
stpitm.AddSiblingBefore(text);
stpitm.AddSiblingBefore(text,updateSelection);
break;
case E_InsertType.After:
stpitm.AddSiblingAfter(text);
stpitm.AddSiblingAfter(text,updateSelection);
break;
case E_InsertType.Child:
stpitm.AddChild(text, fromType, type);