mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 04:36:37 +02:00
✨ Detach typographies when deleted in the file library
This commit is contained in:
parent
dac7a6497f
commit
723cb3b546
3 changed files with 7 additions and 2 deletions
|
@ -499,7 +499,8 @@
|
|||
update-node (fn [node]
|
||||
(if-let [typography (get typographies (:typography-ref-id node))]
|
||||
(merge node (d/without-keys typography [:name :id]))
|
||||
node))]
|
||||
(dissoc node :typography-ref-id
|
||||
:typography-ref-file)))]
|
||||
(generate-sync-text-shape shape container update-node)))
|
||||
|
||||
(defn- get-assets
|
||||
|
|
|
@ -1252,7 +1252,10 @@
|
|||
(fn []
|
||||
(if (or multi-typographies? multi-assets?)
|
||||
(on-assets-delete)
|
||||
(st/emit! (dwl/delete-typography (:id @state))))))
|
||||
(st/emit! (dwu/start-undo-transaction)
|
||||
(dwl/delete-typography (:id @state))
|
||||
(dwl/sync-file file-id file-id)
|
||||
(dwu/commit-undo-transaction)))))
|
||||
|
||||
editting-id (or (:rename-typography local) (:edit-typography local))]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue