diff --git a/CHANGES.md b/CHANGES.md index 9b626a3ae..c2447d24d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ - 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 ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/data/workspace/transforms.cljs b/frontend/src/app/main/data/workspace/transforms.cljs index dde91cdc2..30ee41945 100644 --- a/frontend/src/app/main/data/workspace/transforms.cljs +++ b/frontend/src/app/main/data/workspace/transforms.cljs @@ -739,14 +739,6 @@ (rx/of (set-modifiers [id] {:displacement displ} false true) (apply-modifiers)))))) -(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 @@ -761,7 +753,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