diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index f7cbdc6c5..af4f88160 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -1609,11 +1609,12 @@ :width width :height height :grow-type (if (> (count text) 100) :auto-height :auto-width) - :content (as-content text)}] + :content (as-content text)} + undo-id (uuid/next)] - (rx/of (dwu/start-undo-transaction) + (rx/of (dwu/start-undo-transaction undo-id) (dwsh/create-and-add-shape :text x y shape) - (dwu/commit-undo-transaction)))))) + (dwu/commit-undo-transaction undo-id)))))) ;; TODO: why not implement it in terms of upload-media-workspace? (defn- paste-svg diff --git a/frontend/src/app/main/data/workspace/media.cljs b/frontend/src/app/main/data/workspace/media.cljs index b94125f8f..086a4bb95 100644 --- a/frontend/src/app/main/data/workspace/media.cljs +++ b/frontend/src/app/main/data/workspace/media.cljs @@ -249,7 +249,7 @@ process-svg (fn [svg-data] (let [[shape children] - (svg/create-svg-shapes svg-data pos objects uuid/zero #{} false)] + (svg/create-svg-shapes svg-data pos objects uuid/zero nil #{} false)] [shape children]))] (->> (upload-images svg-data) diff --git a/frontend/src/app/main/data/workspace/svg_upload.cljs b/frontend/src/app/main/data/workspace/svg_upload.cljs index d1a6e1bdc..c96dee88d 100644 --- a/frontend/src/app/main/data/workspace/svg_upload.cljs +++ b/frontend/src/app/main/data/workspace/svg_upload.cljs @@ -559,7 +559,7 @@ page-selected (wsh/lookup-selected state) base (cph/get-base-shape page-objects page-selected) parent-id (:parent-id base) - + [new-shape new-children] (create-svg-shapes svg-data position objects frame-id parent-id selected true) changes (-> (pcb/empty-changes it page-id)