From eedf19474ee76733ed1bd4b185ebc014847ff2fd Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sun, 28 Oct 2018 15:57:08 -0500 Subject: [PATCH] SortedTree - when node is removed, any remaining children (orphans) go to the nursery --- src/client/spark_core/Collections/SortedTree.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/spark_core/Collections/SortedTree.cs b/src/client/spark_core/Collections/SortedTree.cs index 4d4b8ee21..185a76f03 100644 --- a/src/client/spark_core/Collections/SortedTree.cs +++ b/src/client/spark_core/Collections/SortedTree.cs @@ -90,6 +90,9 @@ namespace bts.collections { } else { _remove_from_nursery(pk, node); } + if (node.children.Count > 0) { + _nursery.Add(k, node.children); + } } public SortedTree Resort(IComparer comparer) {