summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/widget/box.vala7
-rw-r--r--core/src/widget/stack.vala7
2 files changed, 8 insertions, 6 deletions
diff --git a/core/src/widget/box.vala b/core/src/widget/box.vala
index 0e069e0..0008fd4 100644
--- a/core/src/widget/box.vala
+++ b/core/src/widget/box.vala
@@ -42,10 +42,11 @@ public class Box : Gtk.Box {
private void _set_children(List<weak Gtk.Widget> arr) {
foreach(var child in get_children()) {
- remove(child);
-
- if (!no_implicit_destroy && arr.find(child).length() == 0)
+ if (!no_implicit_destroy && arr.find(child).length() == 0) {
child.destroy();
+ } else {
+ remove(child);
+ }
}
foreach(var child in arr)
diff --git a/core/src/widget/stack.vala b/core/src/widget/stack.vala
index 020e716..00adf7f 100644
--- a/core/src/widget/stack.vala
+++ b/core/src/widget/stack.vala
@@ -16,10 +16,11 @@ public class Astal.Stack : Gtk.Stack {
private void _set_children(List<weak Gtk.Widget> arr) {
foreach(var child in get_children()) {
- remove(child);
-
- if (!no_implicit_destroy && arr.find(child).length() == 0)
+ if (!no_implicit_destroy && arr.find(child).length() == 0) {
child.destroy();
+ } else {
+ remove(child);
+ }
}
var i = 0;