diff --git a/common/src/app/common/geom/shapes/tree_seq.cljc b/common/src/app/common/geom/shapes/tree_seq.cljc index b846a21296..8ed6b61b8d 100644 --- a/common/src/app/common/geom/shapes/tree_seq.cljc +++ b/common/src/app/common/geom/shapes/tree_seq.cljc @@ -92,5 +92,11 @@ (defn resolve-subtree "Resolves the subtree but only partialy from-to the parameters" [from-id to-id objects] - (->> (get-children-seq from-id objects) - (d/take-until #(= (:id %) to-id)))) + (concat + (->> (get-children-seq from-id objects) + (d/take-until #(= (:id %) to-id))) + + ;; Add the children of `to-id` to the subtree. Rest is to remove the + ;; to-id element that is already on the previous sequence + (->> (get-children-seq to-id objects) + rest)))