mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 07:31:36 +02:00
Merge pull request #2214 from penpot/palba-fix-undo-delete-page
🐛 Fix undo on delete page does not preserve its order
This commit is contained in:
commit
ee1058950e
3 changed files with 17 additions and 8 deletions
|
@ -326,7 +326,10 @@
|
|||
(ptk/reify ::delete-page
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(let [page (get-in state [:workspace-data :pages-index id])
|
||||
(let [pages (get-in state [:workspace-data :pages])
|
||||
index (d/index-of pages id)
|
||||
page (get-in state [:workspace-data :pages-index id])
|
||||
page (assoc page :index index)
|
||||
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/del-page page))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue