diff --git a/frontend/src/app/main/data/workspace/media.cljs b/frontend/src/app/main/data/workspace/media.cljs index d97d0b803..b3f5d48ec 100644 --- a/frontend/src/app/main/data/workspace/media.cljs +++ b/frontend/src/app/main/data/workspace/media.cljs @@ -467,4 +467,5 @@ (watch [_ _ _] (->> (svg->clj [name svg-string]) (rx/take 1) - (rx/map #(svg/add-svg-shapes id % position {:change-selection? false})))))) + (rx/map #(svg/add-svg-shapes id % position {:ignore-selection? true + :change-selection? false})))))) diff --git a/frontend/src/app/main/data/workspace/svg_upload.cljs b/frontend/src/app/main/data/workspace/svg_upload.cljs index a11f8893b..169e2dd3e 100644 --- a/frontend/src/app/main/data/workspace/svg_upload.cljs +++ b/frontend/src/app/main/data/workspace/svg_upload.cljs @@ -64,7 +64,8 @@ ([svg-data position] (add-svg-shapes nil svg-data position nil)) - ([id svg-data position {:keys [change-selection?] :or {change-selection? false}}] + ([id svg-data position {:keys [change-selection? ignore-selection?] + :or {ignore-selection? false change-selection? true}}] (ptk/reify ::add-svg-shapes ptk/WatchEvent (watch [it state _] @@ -73,7 +74,7 @@ page-id (:current-page-id state) objects (wsh/lookup-page-objects state page-id) frame-id (ctst/top-nested-frame objects position) - selected (wsh/lookup-selected state) + selected (if ignore-selection? #{} (wsh/lookup-selected state)) base (cfh/get-base-shape objects selected) selected-id (first selected)