0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

🐛 Fix problem with redo curve drawings

This commit is contained in:
alonso.torres 2023-02-22 10:43:51 +01:00
parent 4297b6fda8
commit a1f41c80a2
3 changed files with 3 additions and 4 deletions

View file

@ -87,7 +87,7 @@
(watch [it state _]
(let [edition (get-in state [:workspace-local :edition])
drawing (get state :workspace-drawing)]
(when-not (or (some? edition) (not-empty drawing))
(when (and (nil? edition) (or (empty drawing) (= :curve (:tool drawing))))
(let [undo (:workspace-undo state)
items (:items undo)
index (or (:index undo) (dec (count items)))]

View file

@ -439,8 +439,6 @@
[:& presence/active-cursors
{:page-id page-id}])
[:& widgets/viewport-actions]
[:& scroll-bars/viewport-scrollbars
{:objects base-objects
:zoom zoom

View file

@ -56,7 +56,8 @@
drawing-obj (:object drawing)
shape (or drawing-obj (-> selected first))]
(when (or (and (= (count selected) 1) (= (:id shape) edition) (not= :text (:type shape)))
(and (some? drawing-obj) (= :path (:type drawing-obj))))
(and (some? drawing-obj) (= :path (:type drawing-obj))
(not= :curve (:tool drawing))))
[:div.viewport-actions
[:& path-actions {:shape shape}]])))