From 6a257503aef3719c7d2fcdf85c2850ac2a7a7ed7 Mon Sep 17 00:00:00 2001 From: Eva Date: Thu, 19 Jan 2023 14:34:16 +0100 Subject: [PATCH] :bug: Fix create layout over mask destroy mask --- frontend/src/app/main/data/workspace/shape_layout.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/shape_layout.cljs b/frontend/src/app/main/data/workspace/shape_layout.cljs index d16e28850..85a429a53 100644 --- a/frontend/src/app/main/data/workspace/shape_layout.cljs +++ b/frontend/src/app/main/data/workspace/shape_layout.cljs @@ -155,10 +155,12 @@ single? (= (count selected-shapes) 1) has-group? (->> selected-shapes (d/seek cph/group-shape?)) is-group? (and single? has-group?) + has-mask? (->> selected-shapes (d/seek cph/mask-shape?)) + is-mask? (and single? has-mask?) has-component? (some true? (map ctc/instance-root? selected-shapes)) is-component? (and single? has-component?)] - (if (and (not is-component?) is-group?) + (if (and (not is-component?) is-group? (not is-mask?)) (let [new-shape-id (uuid/next) parent-id (:parent-id (first selected-shapes)) shapes-ids (:shapes (first selected-shapes))