From 343efc68c5599643c7f8df0172f6792726e86137 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 12 Mar 2024 09:11:06 +0100 Subject: [PATCH] :bug: Propagate parent changes con reset overrides --- frontend/src/app/main/data/workspace/libraries.cljs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/libraries.cljs b/frontend/src/app/main/data/workspace/libraries.cljs index c27c00b0f..448997208 100644 --- a/frontend/src/app/main/data/workspace/libraries.cljs +++ b/frontend/src/app/main/data/workspace/libraries.cljs @@ -708,11 +708,18 @@ components-v2 (features/active-feature? state "components/v2") + shape-inst (ctn/get-shape container id) + swap-slot (-> (ctn/get-shape container id) + (ctk/get-swap-slot)) changes (-> (pcb/empty-changes it) (pcb/with-container container) (pcb/with-objects (:objects container)) - (dwlh/generate-sync-shape-direct file-full libraries container id true components-v2))] + (dwlh/generate-sync-shape-direct file-full libraries container id true components-v2) + (cond-> + (some? swap-slot) + ;; We need to propagate parent changes + (dwlh/generate-sync-shape-direct file-full libraries container (:parent-id shape-inst) true components-v2)))] (log/debug :msg "RESET-COMPONENT finished" :js/rchanges (log-changes (:redo-changes changes)