🐛 Fix extract component variant from variant with path (#6303)

This commit is contained in:
Pablo Alba 2025-04-22 09:18:31 +02:00 committed by GitHub
parent 0bff76e5f1
commit fae1df7f4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,11 +97,8 @@
[changes shape]
(let [data (pcb/get-library-data changes)
component (ctcl/get-component data (:component-id shape) true)
new-name (str (:name component)
" / "
(if (ctk/is-variant? shape)
(str/replace (:variant-name shape) #", " " / ")
(:name shape)))
full-name (cfh/merge-path-item (:path component) (:name component))
new-name (cfh/merge-path-item full-name (str/replace (:variant-name shape) #", " " / "))
[cpath cname] (cfh/parse-path-name new-name)]
(-> changes
(pcb/update-component (:component-id shape)