sliding_view: Unparent all children on dispose

This is something all GtkWidget subclasses are supposed to do
with all direct children.
This commit is contained in:
Christopher Davis 2023-03-02 18:06:58 -05:00 • committed by Sophie Herold
parent d6fc93df6c
commit 34b3fb12de

View file

@ -137,6 +137,13 @@ mod imp {
obj.add_controller(scroll_controller);
}
fn dispose(&self) {
let obj = self.obj();
while let Some(child) = obj.first_child() {
child.unparent();
}
}
}
impl WidgetImpl for LpSlidingView {