Added parameter to InsertSiblingBefore to allow us to specify the step/substep type

This commit is contained in:
John Jenko 2014-07-02 14:24:54 +00:00
parent fdebf85b00
commit 68121c1b79

View File

@ -990,6 +990,13 @@ namespace Volian.Controls.Library
{
AddSiblingBefore("", true);
}
public void AddSiblingBefore(int? type, bool updateStatus)
{
SaveContents();
ItemInfo newItemInfo = MyItemInfo.InsertSiblingBefore("", "",type);
DoAddSiblingBefore(newItemInfo, updateStatus);
}
public void AddSiblingBefore(string text, bool updateSelection)
{
// Save RTB text before creating a new item because the process of creating
@ -1000,6 +1007,10 @@ namespace Volian.Controls.Library
// any updates from the richtextbox text.
SaveContents();
ItemInfo newItemInfo = MyItemInfo.InsertSiblingBefore(text);
DoAddSiblingBefore(newItemInfo, updateSelection);
}
public void DoAddSiblingBefore(ItemInfo newItemInfo, bool updateSelection)
{
EditItem newEditItem = null;
switch (_MyChildRelation)
{