🐛 Fix problem with empty paths

This commit is contained in:
alonso.torres 2023-01-18 14:34:16 +01:00
parent 1f9c89fb32
commit 9fd6c65d93

View file

@ -279,11 +279,14 @@
state))) state)))
ptk/WatchEvent ptk/WatchEvent
(watch [_ _ _] (watch [_ state _]
(rx/of (setup-frame-path) (let [content (get-in state [:workspace-drawing :object :content] [])]
(dwdc/handle-finish-drawing) (if (seq content)
(dwe/start-edition-mode shape-id) (rx/of (setup-frame-path)
(change-edit-mode :draw))))) (dwdc/handle-finish-drawing)
(dwe/start-edition-mode shape-id)
(change-edit-mode :draw))
(rx/of (dwdc/handle-finish-drawing)))))))
(defn handle-new-shape (defn handle-new-shape
"Creates a new path shape" "Creates a new path shape"