mirror of
https://github.com/penpot/penpot.git
synced 2026-09-30 07:46:16 +00:00
* 🐛 Don't show duplicate cursor when selection cannot be alt-duplicated (#11165) When pressing Alt and dragging a shape that is inside a component copy (but is not its root), Penpot showed a :duplicate cursor, suggesting the operation would clone the shape. However duplicate-shapes filters those shapes out via ctk/allow-duplicate?, so the move proceeds but no duplicate is ever created — the cursor lied. Fix: compute can-alt-duplicate? in the viewport, which is truthy only when at least one selected shape passes ctk/allow-duplicate?. Pass it to setup-cursor and gate the :duplicate cursor branch on it. When none of the selected shapes can be duplicated the cursor falls through to :pointer-inner, honestly indicating that only a move will happen. * 📎 Add alt-duplicate check to cursor setup Signed-off-by: Andrey Antukh <niwi@niwi.nz> --------- Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Andrey Antukh <niwi@niwi.nz>