mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-23 10:28:21 +00:00
Merge pull request #19 from zed-industries/single-global-action-dispatch
Dispatch global actions only once when triggering a menu item
This commit is contained in:
commit
29d2236ed2
1 changed files with 5 additions and 4 deletions
|
@ -141,12 +141,13 @@ impl App {
|
|||
{
|
||||
let presenter = presenter.clone();
|
||||
let path = presenter.borrow().dispatch_path(ctx.as_ref());
|
||||
if ctx.dispatch_action_any(key_window_id, &path, command, arg.unwrap_or(&())) {
|
||||
return;
|
||||
}
|
||||
ctx.dispatch_action_any(key_window_id, &path, command, arg.unwrap_or(&()));
|
||||
} else {
|
||||
ctx.dispatch_global_action_any(command, arg.unwrap_or(&()));
|
||||
}
|
||||
} else {
|
||||
ctx.dispatch_global_action_any(command, arg.unwrap_or(&()));
|
||||
}
|
||||
ctx.dispatch_global_action_any(command, arg.unwrap_or(&()));
|
||||
}));
|
||||
|
||||
app.0.borrow_mut().weak_self = Some(Rc::downgrade(&app.0));
|
||||
|
|
Loading…
Reference in a new issue