0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00
This commit is contained in:
Andrés Moya 2023-06-22 11:32:31 +02:00
parent 0ae4988908
commit adc6af129c
2 changed files with 9 additions and 7 deletions

View file

@ -43,7 +43,7 @@
[potok.core :as ptk]))
;; Change this to :info :debug or :trace to debug this module, or :warn to reset to default
(log/set-level! :warn)
(log/set-level! :debug)
(defn- log-changes
[changes file]

View file

@ -181,12 +181,14 @@
(not (nil? parent-id))
(assoc :parent-id parent-id))
changes (cond-> (pcb/add-object changes first-shape {:ignore-touched true})
(some? old-id) (pcb/amend-last-change #(assoc % :old-id old-id))) ; on copy/paste old id is used later to reorder the paster layers
changes (reduce #(pcb/add-object %1 %2 {:ignore-touched true})
changes
(rest new-shapes))]
changes (as-> changes $
(pcb/add-object $ first-shape {:ignore-touched true})
(cond-> $
(some? old-id)
(pcb/amend-last-change #(assoc % :old-id old-id))) ; on copy/paste old id is used later to reorder the paster layers
(reduce #(pcb/add-object %1 %2 {:ignore-touched true})
$
(rest new-shapes)))]
[new-shape changes])))