Add new function for editor selection click handling and update viewport logic

This commit is contained in:
2026-04-15 15:07:17 +02:00
parent 6fa52483be
commit 9f502a6aa2
2 changed files with 25 additions and 7 deletions

View File

@@ -43,6 +43,7 @@ import {
import { EffectComposer } from "postprocessing";
import {
applyEditorSelectionClick,
applySameKindSelectionClick,
areEditorSelectionsEqual,
isBrushEdgeSelected,
@@ -6838,12 +6839,9 @@ export class ViewportHost {
if (candidates.length === 0) {
this.lastClickPointer = null;
this.lastClickSelectionKey = null;
if (!event.shiftKey) {
this.brushSelectionChangeHandler?.({
kind: "none"
});
}
this.brushSelectionChangeHandler?.(
applyEditorSelectionClick(this.currentSelection, null, event.shiftKey)
);
return;
}
@@ -6872,7 +6870,7 @@ export class ViewportHost {
const chosen = candidates[candidateIndex];
this.lastClickSelectionKey = chosen.key;
this.brushSelectionChangeHandler?.(
applySameKindSelectionClick(
applyEditorSelectionClick(
this.currentSelection,
chosen.selection,
event.shiftKey