Event dispatch moved to MutableAppContext. No longer dispatches from presenter. Not currently handling key presses properly
This commit is contained in:
parent
c303c4e8f9
commit
4271eb3624
14 changed files with 392 additions and 336 deletions
|
@ -156,9 +156,7 @@ impl ContextMenu {
|
|||
fn confirm(&mut self, _: &Confirm, cx: &mut ViewContext<Self>) {
|
||||
if let Some(ix) = self.selected_index {
|
||||
if let Some(ContextMenuItem::Item { action, .. }) = self.items.get(ix) {
|
||||
let window_id = cx.window_id();
|
||||
let view_id = cx.view_id();
|
||||
cx.dispatch_action_at(window_id, view_id, action.as_ref());
|
||||
cx.dispatch_any_action(action.boxed_clone());
|
||||
self.reset(cx);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue