mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 12:28:30 +02:00
Merge pull request #6011 from penpot/palba-fix-cut-paste-copy
🐛 Fix cut and paste a copy inside its parent
This commit is contained in:
commit
8488be311e
2 changed files with 7 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
- Fix opacity in frame containers [Github #5858](https://github.com/penpot/penpot/pull/5858)
|
||||
- Avoid resizing on click [Taiga #10213](https://tree.taiga.io/project/penpot/issue/10213)
|
||||
- Hide horizontal scroll from dashboard sidebar [Taiga #10422](https://tree.taiga.io/project/penpot/issue/10422)
|
||||
- Fix cut and paste a copy a cmponent inside its parent [Taiga #10365](https://tree.taiga.io/project/penpot/us/10365)
|
||||
|
||||
## 2.5.2
|
||||
|
||||
|
|
|
@ -501,7 +501,12 @@
|
|||
(defn- invalid-structure-for-component?
|
||||
"Check if the structure generated nesting children in parent is invalid in terms of nested components"
|
||||
[objects parent children pasting? libraries]
|
||||
(let [; When we are pasting, the main shapes will be pasted as copies, unless the
|
||||
(let [; If the original shapes had been cutted, and we are pasting them now, they aren't
|
||||
; in objects. We can add them to locate later
|
||||
objects (merge objects
|
||||
(into {} (map (juxt :id identity) children)))
|
||||
|
||||
; When we are pasting, the main shapes will be pasted as copies, unless the
|
||||
; original component doesn't exist or is deleted. So for this function purposes, they
|
||||
; are removed from the list
|
||||
remove? (fn [shape]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue