From 3327a9a3fde7eb91bbdb0b827c2f1d294b646888 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Thu, 16 Feb 2023 19:23:01 -0600 Subject: [PATCH] core: Set clipDepth to 0 when swapDepths affects a clip This makes "Garfield's Comic Creator" properly show panels when you close the editor. --- core/src/display_object/container.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/display_object/container.rs b/core/src/display_object/container.rs index ec3c7e796..cc7dac3a0 100644 --- a/core/src/display_object/container.rs +++ b/core/src/display_object/container.rs @@ -825,10 +825,12 @@ impl<'gc> ChildContainer<'gc> { ) { let prev_depth = child.depth(); child.set_depth(gc_context, depth); + child.set_clip_depth(gc_context, 0); child.set_parent(gc_context, Some(parent)); if let Some(prev_child) = self.depth_list.insert(depth, child) { prev_child.set_depth(gc_context, prev_depth); + prev_child.set_clip_depth(gc_context, 0); prev_child.set_transformed_by_script(gc_context, true); self.depth_list.insert(prev_depth, prev_child);