diff --git a/common/src/app/common/logic/shapes.cljc b/common/src/app/common/logic/shapes.cljc index 413eb9964c..4bf8ff9853 100644 --- a/common/src/app/common/logic/shapes.cljc +++ b/common/src/app/common/logic/shapes.cljc @@ -484,9 +484,11 @@ shape)) {:ignore-touched true :with-objects? true}) (pcb/resize-parents all-parents) + ;; a copy's group unmasked as its main's is no override (pcb/update-shapes groups-to-unmask (fn [shape] - (assoc shape :masked-group false))) + (assoc shape :masked-group false)) + {:ignore-touched (boolean ignore-touched)}) (pcb/update-shapes (map :id interacting-shapes) (fn [shape] (d/update-when shape :interactions diff --git a/common/test/common_tests/logic/composable_gen_test.cljc b/common/test/common_tests/logic/composable_gen_test.cljc index f4aad0e201..adf5c584b0 100644 --- a/common/test/common_tests/logic/composable_gen_test.cljc +++ b/common/test/common_tests/logic/composable_gen_test.cljc @@ -2514,6 +2514,11 @@ :ops [[:delete 11] [:detach 5] [:swap 10] [:add-child] [:structure 0 6 3] [:nest 11] [:transform 2 0 0 7] [:detach 13]]})))) +(t/deftest removing-the-mask-of-a-main-unmasks-its-copies-without-overriding-them + (t/is (map? (cg/run {:world [1 0 {:variants true :rich-variants true :text false :layout :grid + :layout-copies false :layout-children false}] + :ops [[:structure 1 1 1] [:remove-child 1]]})))) + (t/deftest settling-a-bool-in-a-grid-copy-twice-keeps-its-shapes-in-place (t/is (map? (cg/run {:world [3 0 {:variants true :rich-variants true :text true :layout :grid :layout-copies true :layout-children true}]