0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-17 01:12:16 -05:00

🐛 Fix render object with pending status (#6215)

This commit is contained in:
Elena Torró 2025-04-02 19:58:03 +02:00 committed by GitHub
parent 387c5e67f3
commit c332528185
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -405,7 +405,7 @@
(filter #(= (:type %) :add-obj))
(map :obj))]
(doseq [shape added]
(api/set-object [] shape))))
(api/process-object shape))))
(if (and save-undo? (seq undo-changes))
(let [entry {:undo-changes undo-changes

View file

@ -756,6 +756,17 @@
(set-shape-fills fills)
(set-shape-strokes strokes)))))
(defn process-object
[shape]
(let [pending (set-object [] shape)]
(when-let [pending (seq pending)]
(->> (rx/from pending)
(rx/mapcat identity)
(rx/reduce conj [])
(rx/subs! (fn [_]
(clear-drawing-cache)
(request-render "set-objects")))))))
(defn set-objects
[objects]
(let [shapes (into [] (vals objects))