Fix bug introduced in previous commit.

That causes crash draw tools after first draw op.
This commit is contained in:
Andrey Antukh 2016-08-28 10:20:17 +03:00
parent 823a5a8120
commit 9e41946a05
No known key found for this signature in database
GPG Key ID: 4DFEBCB8316A8B95

View File

@ -139,16 +139,16 @@
(letfn [(on-mouse-down [event]
(dom/stop-propagation event)
(when (seq (:selected workspace))
(rs/emit! (uds/deselect-all)))
(let [opts {:shift? (kbd/shift? event)
:ctrl? (kbd/ctrl? event)}]
(rx/push! wb/events-b [:mouse/down opts]))
(if (:drawing workspace)
(rlocks/acquire! :ui/draw)
(rlocks/acquire! :ui/selrect)))
(do
(when (seq (:selected workspace))
(rlocks/release! :shape/edition))
(rlocks/acquire! :ui/selrect))))
(on-context-menu [event]
(dom/prevent-default event)
(dom/stop-propagation event)