mirror of
https://github.com/penpot/penpot.git
synced 2026-05-08 17:48:39 +00:00
🐛 Fix loss of swap slot in some cases of variant switch
This commit is contained in:
parent
d84685c0cb
commit
4779564997
@ -136,6 +136,7 @@
|
||||
- Fix plugin API `ShapeBase.component()` returning the outermost component instead of the immediate component in case of nested component instances [Github #9183](https://github.com/penpot/penpot/issues/9183)
|
||||
- Fix missing `labels.open` translation that surfaced the raw key as the typography font open-button `aria-label`, breaking screen-reader output (by @MilosM348)
|
||||
- Fix plugin API `shape.fills` and `shape.strokes` arrays being read-only [Github #8357](https://github.com/penpot/penpot/issues/8357)
|
||||
- Fix file crashing when switching a variant [Taiga #14014](https://tree.taiga.io/project/penpot/issue/14014)
|
||||
|
||||
|
||||
## 2.15.0 (Unreleased)
|
||||
|
||||
@ -2119,8 +2119,8 @@
|
||||
(contains? #{:auto-height :auto-width} (:grow-type current-shape)))]
|
||||
|
||||
(loop [attrs updatable-attrs
|
||||
roperations [{:type :set-touched :touched (:touched previous-shape)}]
|
||||
uoperations (list {:type :set-touched :touched (:touched current-shape)})]
|
||||
roperations []
|
||||
uoperations []]
|
||||
(if-let [attr (first attrs)]
|
||||
(let [sync-group
|
||||
(ctk/resolve-sync-group (:type previous-shape) attr)
|
||||
@ -2262,7 +2262,13 @@
|
||||
|
||||
(let [updated-attrs (into #{} (comp (filter #(= :set (:type %)))
|
||||
(map :attr))
|
||||
roperations)]
|
||||
roperations)
|
||||
updated-sync-groups (into #{}
|
||||
(keep #(ctk/resolve-sync-group (:type previous-shape) %))
|
||||
updated-attrs)
|
||||
new-touched (set/union (or (:touched current-shape) #{}) updated-sync-groups)
|
||||
roperations (into [{:type :set-touched :touched new-touched}] roperations)
|
||||
uoperations (into [{:type :set-touched :touched (:touched current-shape)}] uoperations)]
|
||||
(cond-> changes
|
||||
(> (count roperations) 1)
|
||||
(-> (add-update-attr-changes current-shape container roperations uoperations)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user