From 5e6719e22ec54d10b2ebc882a472c98e4db3b510 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 20 Oct 2021 14:22:47 +0200 Subject: [PATCH] :bug: Fix paste in place in arboards --- CHANGES.md | 1 + frontend/src/app/main/data/workspace.cljs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 9bc1c955d..8d9f88979 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -41,6 +41,7 @@ - Fix path stroke is not working properly with high thickness [Taiga #2154](https://tree.taiga.io/project/penpot/issue/2154). - Fix bug with transformation operations [Taiga #2155](https://tree.taiga.io/project/penpot/issue/2155). - Fix bug in firefox when a text box is inside a mask [Taiga #2152](https://tree.taiga.io/project/penpot/issue/2152). +- Fix paste in place in arboards [Taiga #2188](https://tree.taiga.io/project/penpot/issue/2188) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index 9219ab1f9..e5e36f6ab 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -1648,7 +1648,6 @@ ;; Procceed with the standard shape paste procediment. (do-paste [it state mouse-pos media] (let [page-objects (wsh/lookup-page-objects state) - all-objects (merge page-objects paste-objects) media-idx (d/index-by :prev-id media) ;; Calculate position for the pasted elements @@ -1670,6 +1669,8 @@ :shape-ref :touched)))))) + all-objects (merge page-objects paste-objects) + page-id (:current-page-id state) unames (-> (wsh/lookup-page-objects state page-id) (dwc/retrieve-used-names)) ;; TODO: move this calculation inside prepare-duplcate-changes?