1
0
Fork 0
forked from wry/wry

tree: fix some issues with toplevel visibility handling

This commit is contained in:
Julian Orth 2024-02-08 16:57:47 +01:00
parent d725a1eac2
commit 0628a9d393
3 changed files with 9 additions and 8 deletions

View file

@ -1429,9 +1429,12 @@ impl ToplevelNode for ContainerNode {
}
fn tl_set_visible(&self, visible: bool) {
self.toplevel_data.visible.set(visible);
for child in self.children.iter() {
child.node.tl_set_visible(visible);
if let Some(mc) = self.mono_child.get() {
mc.node.tl_set_visible(visible);
} else {
for child in self.children.iter() {
child.node.tl_set_visible(visible);
}
}
self.toplevel_data.set_visible(self, visible);
}

View file

@ -179,7 +179,7 @@ impl ToplevelNode for PlaceholderNode {
}
fn tl_set_visible(&self, visible: bool) {
self.toplevel.visible.set(visible);
self.toplevel.set_visible(self, visible);
}
fn tl_destroy(&self) {