0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 14:12:36 -05:00

🐛 Fix problem with grid layout ordering after moving

This commit is contained in:
alonso.torres 2024-11-11 12:34:07 +01:00
parent 7823eaf890
commit c3970255e6
2 changed files with 9 additions and 7 deletions

View file

@ -5,6 +5,7 @@
### :bug: Bugs fixed ### :bug: Bugs fixed
- Fix null pointer exception on number checking functions - Fix null pointer exception on number checking functions
- Fix problem with grid layout ordering after moving [Taiga #9179](https://tree.taiga.io/project/penpot/issue/9179)
### :books: Documentation ### :books: Documentation

View file

@ -391,13 +391,14 @@
(-> (pcb/update-shapes (-> (pcb/update-shapes
[parent-id] [parent-id]
(fn [frame objects] (fn [frame objects]
(-> frame (let [[row column] cell]
;; Assign the cell when pushing into a specific grid cell (-> frame
(cond-> (some? cell) ;; Assign the cell when pushing into a specific grid cell
(-> (ctl/free-cell-shapes ids) (cond-> (some? cell)
(ctl/push-into-cell ids (:row cell) (:column cell)) (-> (ctl/free-cell-shapes ids)
(ctl/assign-cells objects))) (ctl/push-into-cell ids row column)
(ctl/assign-cell-positions objects))) (ctl/assign-cells objects)))
(ctl/assign-cell-positions objects))))
{:with-objects? true}) {:with-objects? true})
(pcb/reorder-grid-children [parent-id]))) (pcb/reorder-grid-children [parent-id])))