Fix an issue with closing nested splits.

The parent id was never assigned to the split, so removing the container
when it became empty failed.
pull/11/head
Blaž Hrastnik 4 years ago
parent 9ca2909c80
commit 9f318a8529

@ -163,7 +163,8 @@ impl Tree {
container.children.insert(pos, node); container.children.insert(pos, node);
self.nodes[node].parent = parent; self.nodes[node].parent = parent;
} else { } else {
let split = Node::container(layout); let mut split = Node::container(layout);
split.parent = parent;
let split = self.nodes.insert(split); let split = self.nodes.insert(split);
let container = match &mut self.nodes[split] { let container = match &mut self.nodes[split] {

Loading…
Cancel
Save