|
|
@ -233,7 +233,6 @@ impl Tree {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if let Some(pos) = container.children.iter().position(|&child| child == index) {
|
|
|
|
if let Some(pos) = container.children.iter().position(|&child| child == index) {
|
|
|
|
container.children.remove(pos);
|
|
|
|
container.children.remove(pos);
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: if container now only has one child, remove it and place child in parent
|
|
|
|
// TODO: if container now only has one child, remove it and place child in parent
|
|
|
|
if container.children.is_empty() && parent_id != self.root {
|
|
|
|
if container.children.is_empty() && parent_id != self.root {
|
|
|
|
// if container now empty, remove it
|
|
|
|
// if container now empty, remove it
|
|
|
|