mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Lose menubar focus after leaf action
This commit is contained in:
parent
8eb7ca871f
commit
56d7646086
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user