mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
update actions on tab append
This commit is contained in:
parent
ee8f7f69af
commit
ff824846e5
1 changed files with 7 additions and 8 deletions
|
|
@ -84,14 +84,6 @@ impl Tab {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
tab_view.connect_page_attached({
|
|
||||||
let window_action = window_action.clone();
|
|
||||||
let index = index.clone();
|
|
||||||
move |tab_view, _, _| {
|
|
||||||
update_actions(tab_view, tab_view.selected_page(), &index, &window_action)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
tab_view.connect_selected_page_notify({
|
tab_view.connect_selected_page_notify({
|
||||||
let window_action = window_action.clone();
|
let window_action = window_action.clone();
|
||||||
let index = index.clone();
|
let index = index.clone();
|
||||||
|
|
@ -152,6 +144,13 @@ impl Tab {
|
||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
.insert(item.widget.tab_page.clone(), item.clone());
|
.insert(item.widget.tab_page.clone(), item.clone());
|
||||||
|
|
||||||
|
update_actions(
|
||||||
|
&self.tab_view,
|
||||||
|
self.tab_view.selected_page(),
|
||||||
|
&self.index,
|
||||||
|
&self.window_action,
|
||||||
|
);
|
||||||
|
|
||||||
item
|
item
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue