From 7c64ed84f1ed495133b707e2c3767e70f1d69341 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Mon, 3 Jun 2024 19:52:00 +0200 Subject: [PATCH] :bug: Fix swap slot is not removed on parent detach --- frontend/src/app/main/data/workspace/libraries_helpers.cljs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/app/main/data/workspace/libraries_helpers.cljs b/frontend/src/app/main/data/workspace/libraries_helpers.cljs index ff03da46e9..4c3b9d803f 100644 --- a/frontend/src/app/main/data/workspace/libraries_helpers.cljs +++ b/frontend/src/app/main/data/workspace/libraries_helpers.cljs @@ -233,6 +233,10 @@ ; If the initial shape was component-root, first level subinstances are converted in top instances (pcb/update-shapes [shape-id] #(assoc % :component-root true)) + component-root? + ; If the initial shape was component-root, first level subinstances can't have swap-slot + (pcb/update-shapes [shape-id] ctk/remove-swap-slot) + :always ; Near shape-refs need to be advanced one level (generate-advance-nesting-level nil container libraries (:id shape)))