diff --git a/CHANGES.md b/CHANGES.md index ca06d87d7..3e3e8f5fe 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -45,6 +45,8 @@ - Fix copy and paste layers order [Taiga #1617](https://tree.taiga.io/project/penpot/issue/1617) - Fix unexpected removal of guides on copy&paste frames [Taiga #3887](https://tree.taiga.io/project/penpot/issue/3887) by @andrewzhurov - Fix props preserving on copy&paste texts [Taiga #3629](https://tree.taiga.io/project/penpot/issue/3629) by @andrewzhurov +- Fix unexpected layers ungrouping on moving it [Taiga #3932](https://tree.taiga.io/project/penpot/issue/3932) by @andrewzhurov + ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/data/workspace/transforms.cljs b/frontend/src/app/main/data/workspace/transforms.cljs index 92c193c5f..02d8d7fc8 100644 --- a/frontend/src/app/main/data/workspace/transforms.cljs +++ b/frontend/src/app/main/data/workspace/transforms.cljs @@ -854,14 +854,6 @@ (rx/of (set-modifiers [id] {:displacement displ} false true) (apply-modifiers [id])))))) -(defn check-frame-move? - [target-frame-id objects position shape] - - (let [current-frame (get objects (:frame-id shape))] - ;; If the current frame contains the point and it's a child of the target - (and (gsh/has-point? current-frame position) - (cph/is-child? objects target-frame-id (:id current-frame))))) - (defn- calculate-frame-for-move [ids] (ptk/reify ::calculate-frame-for-move @@ -876,7 +868,7 @@ (->> ids (cph/clean-loops objects) (keep #(get objects %)) - (remove (partial check-frame-move? frame-id objects position))) + (remove #(= (:frame-id %) frame-id))) moving-frames (->> ids