From 2fef90e7eb42c775fc81001109198c94eff9efc1 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 22 Mar 2023 11:58:33 +0100 Subject: [PATCH] :bug: Fix problem with selected colors and texts --- CHANGES.md | 1 + frontend/src/app/main/data/workspace/colors.cljs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d8fda19d1a..eb71385b70 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -38,6 +38,7 @@ - Font-Kerning does not work on Artboard Export to PNG/JPG/PDF [#3029](https://github.com/penpot/penpot/issues/3029) - Fix manipulate duplicated project (delete, duplicate, rename, pin/unpin...) [Taiga #5027](https://tree.taiga.io/project/penpot/issue/5027) - Fix deleted files appear in search results [Taiga #5002](https://tree.taiga.io/project/penpot/issue/5002) +- Fix problem with selected colors and texts [Taiga #5051](https://tree.taiga.io/project/penpot/issue/5051) ### :heart: Community contributions by (Thank you!) - To @ondrejkonec: for contributing to the code with: diff --git a/frontend/src/app/main/data/workspace/colors.cljs b/frontend/src/app/main/data/workspace/colors.cljs index b80654cae5..4514ffebc5 100644 --- a/frontend/src/app/main/data/workspace/colors.cljs +++ b/frontend/src/app/main/data/workspace/colors.cljs @@ -339,7 +339,8 @@ (defn change-text-color [old-color new-color index node] (let [fills (map #(dissoc % :fill-color-ref-id :fill-color-ref-file) (:fills node)) - parsed-color (d/without-nils (color-att->text old-color)) + parsed-color (-> (d/without-nils (color-att->text old-color)) + (dissoc :fill-color-ref-id :fill-color-ref-file)) parsed-new-color (d/without-nils (color-att->text new-color)) has-color? (d/index-of fills parsed-color)] (cond-> node