🐛 Fix font family typography asset persist across files in new created text layers

This commit is contained in:
Luis de Dios 2026-08-07 12:16:31 +02:00
parent 5571c53502
commit f73df0fba1
2 changed files with 5 additions and 3 deletions

View File

@ -346,7 +346,8 @@
(assoc :recent-colors (:recent-colors storage/user))
(assoc :recent-fonts (:recent-fonts storage/user))
(assoc :current-file-id file-id)
(assoc :workspace-presence {})))
(assoc :workspace-presence {})
(update :workspace-global dissoc :default-font)))
ptk/WatchEvent
(watch [_ state stream]
@ -544,7 +545,7 @@
:workspace-tokens
:workspace-undo
:workspace-versions)
(update :workspace-global dissoc :read-only?)
(update :workspace-global dissoc :read-only? :default-font)
(assoc-in [:workspace-global :options-mode] :design)
(update :files d/update-vals #(dissoc % :data))))

View File

@ -824,7 +824,8 @@
(let [multiple? (->> data vals (d/seek #(= % :multiple)))]
(cond-> state
(not multiple?)
(assoc-in [:workspace-global :default-font] data))))))
(assoc-in [:workspace-global :default-font]
(dissoc data :typography-ref-id :typography-ref-file)))))))
(defn apply-text-modifier
[shape text-modifier]