diff --git a/CHANGES.md b/CHANGES.md index 1463258d7..687558d11 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -50,6 +50,7 @@ - Fix pressing the enter key gives you an internal error [Github 2675](https://github.com/penpot/penpot/issues/2675) [Github 2577](https://github.com/penpot/penpot/issues/2577) - Fix confirm group name with enter doesn't work in assets modal [Taiga #4506](https://tree.taiga.io/project/penpot/issue/4506) - Fix group/ungroup shapes inside a component [Taiga #4052](https://tree.taiga.io/project/penpot/issue/4052) +- Fix wrong update of text in components [Taiga #4646](https://tree.taiga.io/project/penpot/issue/4646) ## 1.16.2-beta diff --git a/common/src/app/common/pages/common.cljc b/common/src/app/common/pages/common.cljc index f12ec2d35..6654e592f 100644 --- a/common/src/app/common/pages/common.cljc +++ b/common/src/app/common/pages/common.cljc @@ -13,6 +13,11 @@ (def default-color clr/gray-20) (def root uuid/zero) +;; Attributes that may be synced in components, and the group they belong to. +;; When one attribute is modified in a shape inside a component, the corresponding +;; group is marked as :touched. Then, if the shape is synced with the remote shape +;; in the main component, none of the attributes of the same group is changed. + (def component-sync-attrs {:name :name-group :fills :fill-group @@ -23,6 +28,7 @@ :fill-color-ref-id :fill-group :hide-fill-on-export :fill-group :content :content-group + :position-data :content-group :hidden :visibility-group :blocked :modifiable-group :grow-type :text-font-group @@ -63,7 +69,6 @@ :rotation :geometry-group :transform :geometry-group :transform-inverse :geometry-group - :position-data :geometry-group :opacity :layer-effects-group :blend-mode :layer-effects-group :shadow :shadow-group diff --git a/frontend/src/app/main/data/workspace/modifiers.cljs b/frontend/src/app/main/data/workspace/modifiers.cljs index ec2688421..740291788 100644 --- a/frontend/src/app/main/data/workspace/modifiers.cljs +++ b/frontend/src/app/main/data/workspace/modifiers.cljs @@ -8,6 +8,7 @@ "Events related with shapes transformations" (:require [app.common.data :as d] + [app.common.data.macros :as dm] [app.common.geom.point :as gpt] [app.common.geom.shapes :as gsh] [app.common.math :as mth] @@ -100,7 +101,7 @@ (let [children (map (d/getf objects) (:shapes shape)) shape-id (:id shape) - transformed-shape (gsh/transform-shape shape (get modif-tree shape-id)) + transformed-shape (gsh/transform-shape shape (dm/get-in modif-tree [shape-id :modifiers])) [root transformed-root ignore-geometry?] (check-delta shape root transformed-shape transformed-root objects modif-tree)