Skip to content

Commit

Permalink
Revert ":bug: swap slot is not copied on copy-paste of a main"
Browse files Browse the repository at this point in the history
This reverts commit 2a752e3.
  • Loading branch information
pabloalba authored and hirunatan committed May 29, 2024
1 parent b847754 commit b4a7a15
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions common/src/app/common/types/container.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,7 @@
(fn [new-shape original-shape]
(let [new-name (:name new-shape)
root? (or (ctk/instance-root? original-shape) ; If shape is inside a component (not components-v2)
(nil? (:parent-id original-shape))) ; we detect it by having no parent)
swap-slot (ctk/get-swap-slot original-shape)]
(nil? (:parent-id original-shape)))] ; we detect it by having no parent)

(when root?
(vswap! unames conj new-name))
Expand All @@ -399,9 +398,6 @@
(-> (gsh/move delta)
(dissoc :touched))

(some? swap-slot)
(assoc :touched #{(ctk/build-swap-slot-group swap-slot)})

(and main-instance? root?)
(assoc :main-instance true)

Expand Down

0 comments on commit b4a7a15

Please sign in to comment.