From 7ab407608ee11e6ac71b886b15b94f2f87c410ae Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 4 Apr 2026 20:11:41 +0200 Subject: [PATCH] Add hover selection handling for 'select' tool mode in ViewportHost --- src/viewport-three/viewport-host.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index 069e1c07..4679c0bb 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -3084,6 +3084,16 @@ export class ViewportHost { return; } + if (this.toolMode === "select") { + const hoveredCandidate = this.getSelectionCandidates(event)[0]?.selection ?? { kind: "none" }; + this.setHoveredSelection(hoveredCandidate); + return; + } + + this.setHoveredSelection({ + kind: "none" + }); + if (this.toolMode !== "create" || this.creationPreview === null) { return; } @@ -3136,6 +3146,10 @@ export class ViewportHost { return; } + this.setHoveredSelection({ + kind: "none" + }); + // Keep the shared creation preview alive across panel boundaries; the next // viewport panel will update it as the pointer continues moving. };