mirror of
https://github.com/penpot/penpot.git
synced 2025-03-15 01:01:30 -05:00
🐛 Fix erroneous touched state when delete a copy and then undo
This commit is contained in:
parent
0b316d6828
commit
8c3f90fe36
2 changed files with 47 additions and 45 deletions
|
@ -359,7 +359,8 @@
|
|||
(apply-changes-local)))))
|
||||
|
||||
(defn remove-objects
|
||||
[changes ids]
|
||||
([changes ids] (remove-objects changes ids nil))
|
||||
([changes ids {:keys [ignore-touched] :or {ignore-touched false}}]
|
||||
(assert-page-id changes)
|
||||
(assert-objects changes)
|
||||
(let [page-id (::page-id (meta changes))
|
||||
|
@ -370,6 +371,7 @@
|
|||
(conj change-set
|
||||
{:type :del-obj
|
||||
:page-id page-id
|
||||
:ignore-touched ignore-touched
|
||||
:id id}))
|
||||
|
||||
add-undo-change-shape
|
||||
|
@ -406,7 +408,7 @@
|
|||
(update :undo-changes #(as-> % $
|
||||
(reduce add-undo-change-parent $ ids)
|
||||
(reduce add-undo-change-shape $ ids)))
|
||||
(apply-changes-local))))
|
||||
(apply-changes-local)))))
|
||||
|
||||
(defn resize-parents
|
||||
[changes ids]
|
||||
|
|
|
@ -314,7 +314,7 @@
|
|||
components-to-delete)
|
||||
|
||||
changes (-> changes
|
||||
(pcb/remove-objects all-children)
|
||||
(pcb/remove-objects all-children {:ignore-touched true})
|
||||
(pcb/remove-objects ids)
|
||||
(pcb/remove-objects empty-parents)
|
||||
(pcb/resize-parents all-parents)
|
||||
|
|
Loading…
Add table
Reference in a new issue