diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index c3103982..e9a41172 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -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) {