mirror of
https://github.com/penpot/penpot.git
synced 2026-08-09 22:38:40 +00:00
🐛 Fix font family typography asset persist across files in new created text layers
This commit is contained in:
parent
5571c53502
commit
f73df0fba1
@ -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))))
|
||||
|
||||
|
||||
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user