[fractal] components: Unparent replaced widgets in LabelWithWidgets
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] components: Unparent replaced widgets in LabelWithWidgets
- Date: Wed, 8 Jun 2022 10:47:31 +0000 (UTC)
commit 78798353b3ce98b6c651321b4a2e377a5e52a0ce
Author: Kévin Commaille <zecakeh tedomum fr>
Date: Mon Jun 6 15:08:16 2022 +0200
components: Unparent replaced widgets in LabelWithWidgets
src/components/label_with_widgets.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/components/label_with_widgets.rs b/src/components/label_with_widgets.rs
index db3dcaa55..33af9aac7 100644
--- a/src/components/label_with_widgets.rs
+++ b/src/components/label_with_widgets.rs
@@ -206,7 +206,10 @@ impl LabelWithWidgets {
pub fn set_widgets<P: IsA<gtk::Widget>>(&self, widgets: Vec<P>) {
let priv_ = self.imp();
- priv_.widgets.borrow_mut().clear();
+ for widget in priv_.widgets.take() {
+ widget.unparent();
+ }
+
priv_
.widgets
.borrow_mut()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]