Lose menubar focus after leaf action

This commit is contained in:
Alexandre Bury 2018-08-05 18:17:56 -07:00
parent 8eb7ca871f
commit 56d7646086

View File

@ -195,6 +195,8 @@ impl Menubar {
fn select_child(&mut self, open_only: bool) -> EventResult {
match self.root.children[self.focus] {
MenuItem::Leaf(_, ref cb) if !open_only => {
// Go inactive after an action.
self.state = State::Inactive;
EventResult::Consumed(Some(cb.clone()))
}
MenuItem::Subtree(_, ref tree) => {