diff --git a/common/src/app/common/files/changes.cljc b/common/src/app/common/files/changes.cljc index 9703f68f32..333cbd82cb 100644 --- a/common/src/app/common/files/changes.cljc +++ b/common/src/app/common/files/changes.cljc @@ -1200,7 +1200,8 @@ (into #{} xform all-parents)))] (reduce #(set/union %1 (check-shape %2 [])) - (check-shape parent-id [parent-id]) + (into (check-shape parent-id [parent-id]) + (keep #(get-in page [:objects % :component-id])) shapes) shapes)) (when component-id #{component-id}))) diff --git a/common/test/common_tests/logic/comp_expected_geometry_test.cljc b/common/test/common_tests/logic/comp_expected_geometry_test.cljc index 0399ae1719..0fff701619 100644 --- a/common/test/common_tests/logic/comp_expected_geometry_test.cljc +++ b/common/test/common_tests/logic/comp_expected_geometry_test.cljc @@ -189,3 +189,14 @@ (t/is (gsh/close-attrs? :points (:points text) (:points synced) 0.01)) (t/is (mth/close? (:x text) (:x synced) 0.01)) (t/is (mth/close? (:y text) (:y synced) 0.01))))) + +(t/deftest nesting-a-copy-settles-its-derived-orientation-before-its-new-main + (let [initial (-> (setup/nested-component-with-copy) + (r/step (n/rotate :main2-root 45)) r/settle + (r/step (n/detach :copy-root)) r/settle + (as-> s (tm/apply-to (n/create-component "destination" setup/labeled-fill :size 100) s))) + moved (-> initial + (r/step (n/nest-copy :copy-instance (n/main-head-of "destination"))) r/settle) + file (tm/file moved) + full (:file (r/sync-cascade file {} (keys (get-in file [:data :components]))))] + (t/is (= (thn/normalize-file file) (thn/normalize-file full)))))