mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
fix switch page event listener
This commit is contained in:
parent
18d9d3b4c5
commit
3d2bca138e
1 changed files with 3 additions and 2 deletions
|
|
@ -55,10 +55,11 @@ impl Tab {
|
||||||
tab.pages.borrow_mut().remove(id);
|
tab.pages.borrow_mut().remove(id);
|
||||||
});
|
});
|
||||||
|
|
||||||
self.widget.connect_switch_page({
|
// Switch page post-event (`connect_switch_page` activates before `page_number` get updated)
|
||||||
|
self.widget.connect_page_notify({
|
||||||
let action_update = self.action_update.clone();
|
let action_update = self.action_update.clone();
|
||||||
// Update window header with current page title
|
// Update window header with current page title
|
||||||
move |_, _, _| action_update.activate(None)
|
move |_| action_update.activate(None)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue