mirror of
https://github.com/penpot/penpot.git
synced 2026-05-28 11:23:42 +00:00
🐛 Fix problem when drag+duplicate a full grid
This commit is contained in:
parent
b5a6867058
commit
6611fbd13b
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
|
- Fix problem when drag+duplicate a full grid [Taiga #12565](https://tree.taiga.io/project/penpot/issue/12565)
|
||||||
|
|
||||||
|
|
||||||
## 2.12.0 (Unreleased)
|
## 2.12.0 (Unreleased)
|
||||||
|
|
||||||
|
|||||||
@ -2815,13 +2815,15 @@
|
|||||||
ids-map (into {} (map #(vector % (uuid/next))) all-ids)
|
ids-map (into {} (map #(vector % (uuid/next))) all-ids)
|
||||||
|
|
||||||
|
|
||||||
;; If there is an alt-duplication of a variant, change its parent to root
|
;; If there is an alt-duplication we change to root
|
||||||
;; so the copy is made as a child of root
|
;; For variants so the copy is made as a child of root
|
||||||
;; This is because inside a variant-container can't be a copy
|
;; This is because inside a variant-container can't be a copy
|
||||||
|
;; For other shape this way the layout won't be changed when duplicated
|
||||||
|
;; and if you move outside the layout will not change
|
||||||
shapes (map (fn [shape]
|
shapes (map (fn [shape]
|
||||||
(if (and alt-duplication? (ctk/is-variant? shape))
|
(cond-> shape
|
||||||
(assoc shape :parent-id uuid/zero :frame-id nil)
|
alt-duplication?
|
||||||
shape))
|
(assoc :parent-id uuid/zero :frame-id uuid/zero)))
|
||||||
shapes)
|
shapes)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user