mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 04:02:01 +02:00
🐛 Fix problem updating layout when duplicating component
This commit is contained in:
parent
6d40166de7
commit
052282cff9
3 changed files with 35 additions and 22 deletions
|
@ -529,10 +529,13 @@
|
|||
(let [libraries (dsh/lookup-libraries state)
|
||||
library (get libraries library-id)
|
||||
components-v2 (features/active-feature? state "components/v2")
|
||||
changes (-> (pcb/empty-changes it nil)
|
||||
(cll/generate-duplicate-component library component-id new-component-id components-v2))]
|
||||
|
||||
(rx/of (dch/commit-changes changes)))))))
|
||||
[main-instance changes]
|
||||
(-> (pcb/empty-changes it nil)
|
||||
(cll/generate-duplicate-component library component-id new-component-id components-v2))]
|
||||
(rx/of
|
||||
(ptk/data-event :layout/update {:ids [(:id main-instance)]})
|
||||
(dch/commit-changes changes)))))))
|
||||
|
||||
(defn delete-component
|
||||
"Delete the component with the given id, from the current file library."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue