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.
This commit is contained in:
Blaž Hrastnik 2021-04-08 16:53:57 +09:00
parent 9ca2909c80
commit 9f318a8529

View File

@ -163,7 +163,8 @@ pub fn split(&mut self, view: View, layout: Layout) -> ViewId {
container.children.insert(pos, node);
self.nodes[node].parent = parent;
} else {
let split = Node::container(layout);
let mut split = Node::container(layout);
split.parent = parent;
let split = self.nodes.insert(split);
let container = match &mut self.nodes[split] {