From f195d2b0b5be7f3302a8d9436875ff799ebfc1ea Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 5 Apr 2026 04:23:49 +0200 Subject: [PATCH] Add function to check if selection can be duplicated --- src/app/App.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/App.js b/src/app/App.js index 0bc37a7a..263d6665 100644 --- a/src/app/App.js +++ b/src/app/App.js @@ -457,6 +457,20 @@ function isTextEntryTarget(target) { target instanceof HTMLSelectElement || target.isContentEditable); } +function selectionCanBeDuplicated(selection) { + switch (selection.kind) { + case "brushes": + case "entities": + case "modelInstances": + return selection.ids.length > 0; + case "brushFace": + case "brushEdge": + case "brushVertex": + return true; + case "none": + return false; + } +} function isCommitIncrementKey(key) { return key === "ArrowUp" || key === "ArrowDown" || key === "PageUp" || key === "PageDown"; }