mirror of
https://github.com/penpot/penpot.git
synced 2025-01-26 08:29:42 -05:00
Merge pull request #2969 from penpot/alotor-fix-redo-curve-tool
🐛 Fix problem with redo curve drawings
This commit is contained in:
commit
475b6ff6e0
3 changed files with 3 additions and 4 deletions
|
@ -87,7 +87,7 @@
|
||||||
(watch [it state _]
|
(watch [it state _]
|
||||||
(let [edition (get-in state [:workspace-local :edition])
|
(let [edition (get-in state [:workspace-local :edition])
|
||||||
drawing (get state :workspace-drawing)]
|
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)
|
(let [undo (:workspace-undo state)
|
||||||
items (:items undo)
|
items (:items undo)
|
||||||
index (or (:index undo) (dec (count items)))]
|
index (or (:index undo) (dec (count items)))]
|
||||||
|
|
|
@ -439,8 +439,6 @@
|
||||||
[:& presence/active-cursors
|
[:& presence/active-cursors
|
||||||
{:page-id page-id}])
|
{:page-id page-id}])
|
||||||
|
|
||||||
[:& widgets/viewport-actions]
|
|
||||||
|
|
||||||
[:& scroll-bars/viewport-scrollbars
|
[:& scroll-bars/viewport-scrollbars
|
||||||
{:objects base-objects
|
{:objects base-objects
|
||||||
:zoom zoom
|
:zoom zoom
|
||||||
|
|
|
@ -56,7 +56,8 @@
|
||||||
drawing-obj (:object drawing)
|
drawing-obj (:object drawing)
|
||||||
shape (or drawing-obj (-> selected first))]
|
shape (or drawing-obj (-> selected first))]
|
||||||
(when (or (and (= (count selected) 1) (= (:id shape) edition) (not= :text (:type shape)))
|
(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
|
[:div.viewport-actions
|
||||||
[:& path-actions {:shape shape}]])))
|
[:& path-actions {:shape shape}]])))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue