mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 14:09:17 +00:00
🐛 Fix extract component variant from variant with path (#6303)
This commit is contained in:
parent
0bff76e5f1
commit
fae1df7f4b
@ -97,11 +97,8 @@
|
|||||||
[changes shape]
|
[changes shape]
|
||||||
(let [data (pcb/get-library-data changes)
|
(let [data (pcb/get-library-data changes)
|
||||||
component (ctcl/get-component data (:component-id shape) true)
|
component (ctcl/get-component data (:component-id shape) true)
|
||||||
new-name (str (:name component)
|
full-name (cfh/merge-path-item (:path component) (:name component))
|
||||||
" / "
|
new-name (cfh/merge-path-item full-name (str/replace (:variant-name shape) #", " " / "))
|
||||||
(if (ctk/is-variant? shape)
|
|
||||||
(str/replace (:variant-name shape) #", " " / ")
|
|
||||||
(:name shape)))
|
|
||||||
[cpath cname] (cfh/parse-path-name new-name)]
|
[cpath cname] (cfh/parse-path-name new-name)]
|
||||||
(-> changes
|
(-> changes
|
||||||
(pcb/update-component (:component-id shape)
|
(pcb/update-component (:component-id shape)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user