mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
🐛 Fix exit edit path mode
This commit is contained in:
parent
1beb39ff60
commit
bd9874cf28
2 changed files with 9 additions and 13 deletions
|
@ -168,13 +168,6 @@
|
|||
;; Toolbar
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defn toggle-toolbar-visibility
|
||||
[]
|
||||
(ptk/reify ::toggle-toolbar-visibility
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(update-in state [:workspace-local :hide-toolbar] not))))
|
||||
|
||||
(defn hide-toolbar
|
||||
[]
|
||||
(ptk/reify ::hide-toolbar
|
||||
|
@ -188,3 +181,10 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(assoc-in state [:workspace-local :hide-toolbar] false))))
|
||||
|
||||
(defn toggle-toolbar-visibility
|
||||
[]
|
||||
(ptk/reify ::toggle-toolbar-visibility
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(update-in state [:workspace-local :hide-toolbar] not))))
|
||||
|
|
|
@ -22,13 +22,9 @@
|
|||
(defn esc-pressed []
|
||||
(ptk/reify ::esc-pressed
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(watch [_ _ _]
|
||||
;; Not interrupt when we're editing a path
|
||||
(let [edition-id (or (get-in state [:workspace-drawing :object :id])
|
||||
(get-in state [:workspace-local :edition]))
|
||||
path-edit-mode (get-in state [:workspace-local :edit-path edition-id :edit-mode])]
|
||||
(when-not (= :draw path-edit-mode)
|
||||
(rx/of :interrupt))))))
|
||||
(rx/of :interrupt))))
|
||||
|
||||
(def shortcuts
|
||||
{:move-nodes {:tooltip "M"
|
||||
|
|
Loading…
Reference in a new issue