Switch action dispatch to use MutableAppContext parent utilities and delete parent map from presenter
This commit is contained in:
parent
4271eb3624
commit
6442ec59e7
6 changed files with 100 additions and 52 deletions
|
@ -441,6 +441,7 @@ impl Pane {
|
|||
pane.active_item_index = usize::MAX;
|
||||
};
|
||||
|
||||
cx.reparent(&item);
|
||||
pane.items.insert(item_ix, item);
|
||||
pane.activate_item(item_ix, activate_pane, focus_item, false, cx);
|
||||
cx.notify();
|
||||
|
|
|
@ -140,6 +140,7 @@ impl Sidebar {
|
|||
}
|
||||
}),
|
||||
];
|
||||
cx.reparent(&view);
|
||||
self.items.push(Item {
|
||||
icon_path,
|
||||
tooltip,
|
||||
|
|
|
@ -81,6 +81,7 @@ impl StatusBar {
|
|||
where
|
||||
T: 'static + StatusItemView,
|
||||
{
|
||||
cx.reparent(&item);
|
||||
self.left_items.push(Box::new(item));
|
||||
cx.notify();
|
||||
}
|
||||
|
@ -89,6 +90,7 @@ impl StatusBar {
|
|||
where
|
||||
T: 'static + StatusItemView,
|
||||
{
|
||||
cx.reparent(&item);
|
||||
self.right_items.push(Box::new(item));
|
||||
cx.notify();
|
||||
}
|
||||
|
|
|
@ -708,6 +708,12 @@ impl Into<AnyViewHandle> for Box<dyn ItemHandle> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<AnyViewHandle> for &Box<dyn ItemHandle> {
|
||||
fn into(self) -> AnyViewHandle {
|
||||
self.to_any()
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for Box<dyn ItemHandle> {
|
||||
fn clone(&self) -> Box<dyn ItemHandle> {
|
||||
self.boxed_clone()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue