From 68121c1b79b7194e60d18231f75475b613b245d8 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 2 Jul 2014 14:24:54 +0000 Subject: [PATCH] Added parameter to InsertSiblingBefore to allow us to specify the step/substep type --- PROMS/Volian.Controls.Library/EditItem.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) {