mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
📎 Give pasted shapes fill and stroke lists in the harness paste
The clipboard's paste maps over the fills and strokes of every shape it adds, so a shape without them, such as a group, gets empty lists. The harness paste left them out, and the frontend replay of a generated paste differed from the JVM run by them. Harness only; the benchmark is not run. AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
0cce919e48
commit
29a1b18f08
@ -1384,7 +1384,14 @@
|
||||
(gpt/point 0 0)
|
||||
libs
|
||||
(:data the-file)
|
||||
(:id the-file)))
|
||||
(:id the-file))
|
||||
;; as the clipboard's paste, each added shape has fill and stroke lists
|
||||
(pcb/amend-changes (fn [change]
|
||||
(cond-> change
|
||||
(= :add-obj (:type change))
|
||||
(update :obj #(-> %
|
||||
(update :fills (fnil vec []))
|
||||
(update :strokes (fnil vec []))))))))
|
||||
file' (thf/apply-changes the-file changes :validate? false)]
|
||||
(-> situation
|
||||
(tm/with-file file')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user