mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
wip
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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])))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user