mirror of
https://github.com/penpot/penpot.git
synced 2025-03-14 16:51:18 -05:00
🐛 Fix problem when ctrl+d when moving
This commit is contained in:
parent
350c44f56f
commit
4bf5434e8f
2 changed files with 32 additions and 25 deletions
|
@ -73,9 +73,15 @@
|
|||
(fn [subpaths current]
|
||||
(let [is-move? (= :move-to (:command current))
|
||||
last-idx (dec (count subpaths))]
|
||||
(if is-move?
|
||||
(cond
|
||||
is-move?
|
||||
(conj subpaths (make-subpath current))
|
||||
(update subpaths last-idx add-subpath-command current))))]
|
||||
|
||||
(>= last-idx 0)
|
||||
(update subpaths last-idx add-subpath-command current)
|
||||
|
||||
:else
|
||||
subpaths)))]
|
||||
(->> content
|
||||
(reduce reduce-subpath []))))
|
||||
|
||||
|
|
|
@ -432,6 +432,7 @@
|
|||
(ptk/reify ::duplicate-selected
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(when (nil? (get-in state [:workspace-local :transform]))
|
||||
(let [page-id (:current-page-id state)
|
||||
objects (wsh/lookup-page-objects state page-id)
|
||||
selected (wsh/lookup-selected state)
|
||||
|
@ -461,7 +462,7 @@
|
|||
:undo-changes uchanges
|
||||
:origin it})
|
||||
(select-shapes selected)
|
||||
(memorize-duplicated id-original id-duplicated))))))
|
||||
(memorize-duplicated id-original id-duplicated)))))))
|
||||
|
||||
(defn change-hover-state
|
||||
[id value]
|
||||
|
|
Loading…
Add table
Reference in a new issue