|
|
|
@ -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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|