Ok now it hides but preview is not working

main
Elijah Voigt 3 months ago
parent ba51ba806d
commit e8f9cfbe88

@ -808,10 +808,12 @@ fn control_menu(
.iter_descendants(root) .iter_descendants(root)
.any(|child| is_hovered.contains(&&child)); .any(|child| is_hovered.contains(&&child));
if !tree_still_hovered { if !tree_still_hovered {
info!("Tree is not hovered");
if let Ok(mut n) = nav.get_mut(root) {
*n = NavState::Closed;
}
parents.iter_descendants(root).for_each(|child| { parents.iter_descendants(root).for_each(|child| {
if let Ok(mut n) = nav.get_mut(child) { if let Ok(mut n) = nav.get_mut(child) {
info!("Closing {:?} for {:?}", child, root);
*n = NavState::Closed; *n = NavState::Closed;
} }
}) })

Loading…
Cancel
Save