diff --git a/CHANGES.md b/CHANGES.md index 66073f114..f80e97245 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -129,6 +129,7 @@ - Fix problem with linked colors to strokes [Github #3522](https://github.com/penpot/penpot/issues/3522) - Fix problem with hand tool stuck [Github #3318](https://github.com/penpot/penpot/issues/3318) - Fix problem with fix scrolling on nested elements [Github #3508](https://github.com/penpot/penpot/issues/3508) +- Fix problem when changing typography assets [Github #3683](https://github.com/penpot/penpot/issues/3683) ## 1.19.5 diff --git a/frontend/src/app/main/data/workspace/libraries_helpers.cljs b/frontend/src/app/main/data/workspace/libraries_helpers.cljs index d157dcd3d..296cd7c92 100644 --- a/frontend/src/app/main/data/workspace/libraries_helpers.cljs +++ b/frontend/src/app/main/data/workspace/libraries_helpers.cljs @@ -464,21 +464,35 @@ [changes shape container update-node] (let [old-content (:content shape) new-content (txt/transform-nodes update-node old-content) + + redo-change + (make-change + container + {:type :mod-obj + :id (:id shape) + :operations [{:type :set + :attr :content + :val new-content} + {:type :set + :attr :position-data + :val nil}]}) + + undo-change + (make-change + container + {:type :mod-obj + :id (:id shape) + :operations [{:type :set + :attr :content + :val old-content} + {:type :set + :attr :position-data + :val nil}]}) + changes' (-> changes - (update :redo-changes conj (make-change - container - {:type :mod-obj - :id (:id shape) - :operations [{:type :set - :attr :content - :val new-content}]})) - (update :undo-changes conj (make-change - container - {:type :mod-obj - :id (:id shape) - :operations [{:type :set - :attr :content - :val old-content}]})))] + (update :redo-changes conj redo-change) + (update :undo-changes conj undo-change))] + (if (= new-content old-content) changes changes'))) diff --git a/frontend/translations/en.po b/frontend/translations/en.po index b1a01bb1a..df15b1c17 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -988,7 +988,7 @@ msgid "errors.webhooks.invalid-uri" msgstr "URL does not pass validation." msgid "errors.webhooks.last-delivery" -msgstr "Last delivery was not successfull." +msgstr "Last delivery was not successful." msgid "errors.webhooks.ssl-validation" msgstr "Error on SSL validation." @@ -3144,7 +3144,7 @@ msgid "viewer.header.sitemap" msgstr "Sitemap" msgid "webhooks.last-delivery.success" -msgstr "Last delivery was successfull." +msgstr "Last delivery was successful." #: src/app/main/ui/workspace/sidebar/align.cljs msgid "workspace.align.hcenter"