Close the menu when selecting a different layer in the syntax tree view

This commit is contained in:
Max Brunsfeld 2023-06-12 15:14:34 -07:00
parent 56b749788f
commit b4f3a88b38

View file

@ -530,6 +530,7 @@ impl SyntaxTreeToolbarItemView {
let layer = snapshot.syntax_layers().nth(layer_ix)?;
buffer_state.active_layer = Some(layer.to_owned());
view.selected_descendant_ix = None;
self.menu_open = false;
cx.notify();
Some(())
})