summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-09-12 11:35:59 +0000
committerAylur <[email protected]>2024-09-12 11:35:59 +0000
commite1fa0fca693d1b1fb52161a5736342e7c9f59e34 (patch)
tree134d90318699503db9479f1df605e5c5c1c38a54
parentef46b758cd9eb9bd94a657ea46236f55a7f99f8d (diff)
fix: box and stack children setter
-rw-r--r--core/src/widget/box.vala6
-rw-r--r--core/src/widget/stack.vala6
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();
}