0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-04 13:50:12 -05:00

🐛 Fix problem with reorder on grid layout layers

This commit is contained in:
alonso.torres 2024-12-11 14:20:06 +01:00 committed by Andrés Moya
parent 2d512ef273
commit 377f636b8e
3 changed files with 5 additions and 2 deletions

View file

@ -31,6 +31,7 @@
### :bug: Bugs fixed
- Fix problem with some texts desynchronization [Taiga #9379](https://tree.taiga.io/project/penpot/issue/9379)
- Fix problem with reoder grid layers [#5446](https://github.com/penpot/penpot/issues/5446)
## 2.3.3

View file

@ -304,7 +304,9 @@
(->> ids
(mapcat #(ctn/get-child-heads objects %))
(map :id)))
cell (or cell (ctl/get-cell-by-index parent to-index))]
index-cell-data (when to-index (ctl/get-cell-by-index parent to-index))
cell (or cell (and index-cell-data [(:row index-cell-data) (:column index-cell-data)]))]
(-> changes
(pcb/with-page-id page-id)

View file

@ -1479,7 +1479,7 @@
(defn get-cell-by-index
[parent to-index]
(let [cells (get-cells parent {:sort? true :remove-empty? true})
to-index (- (count cells) to-index)]
to-index (- (count cells) to-index 1)]
(nth cells to-index nil)))
(defn add-children-to-index