diff options
author | Aylur <[email protected]> | 2024-09-12 11:35:59 +0000 |
---|---|---|
committer | Aylur <[email protected]> | 2024-09-12 11:35:59 +0000 |
commit | e1fa0fca693d1b1fb52161a5736342e7c9f59e34 (patch) | |
tree | 134d90318699503db9479f1df605e5c5c1c38a54 /core | |
parent | ef46b758cd9eb9bd94a657ea46236f55a7f99f8d (diff) |
fix: box and stack children setter
Diffstat (limited to 'core')
-rw-r--r-- | core/src/widget/box.vala | 6 | ||||
-rw-r--r-- | core/src/widget/stack.vala | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/src/widget/box.vala b/core/src/widget/box.vala index d522967..0e069e0 100644 --- a/core/src/widget/box.vala +++ b/core/src/widget/box.vala @@ -42,9 +42,9 @@ public class Box : Gtk.Box { private void _set_children(List<weak Gtk.Widget> arr) { foreach(var child in get_children()) { - if (no_implicit_destroy) - remove(child); - else if (arr.find(child).length() == 0) + remove(child); + + if (!no_implicit_destroy && arr.find(child).length() == 0) child.destroy(); } diff --git a/core/src/widget/stack.vala b/core/src/widget/stack.vala index e9a2bd2..020e716 100644 --- a/core/src/widget/stack.vala +++ b/core/src/widget/stack.vala @@ -16,9 +16,9 @@ public class Astal.Stack : Gtk.Stack { private void _set_children(List<weak Gtk.Widget> arr) { foreach(var child in get_children()) { - if (no_implicit_destroy) - remove(child); - else if (arr.find(child).length() == 0) + remove(child); + + if (!no_implicit_destroy && arr.find(child).length() == 0) child.destroy(); } |