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:
parent
9ca2909c80
commit
9f318a8529
1 changed files with 2 additions and 1 deletions
|
@ -163,7 +163,8 @@ impl Tree {
|
|||
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] {
|
||||
|
|
Loading…
Reference in a new issue