From c4fa489bf9a7774c8e474e3c238787846a155323 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 13 Apr 2026 22:28:00 +0200 Subject: [PATCH] Add path point selection handling in App.tsx --- src/app/App.tsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 0e2f66d1..49bba1b7 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1656,6 +1656,12 @@ export function App({ store, initialStatusMessage }: AppProps) { const materialList = sortDocumentMaterials(editorState.document.materials); const selectedBrush = getSelectedBoxBrush(editorState.selection, brushList); const selectedPath = getSelectedPath(editorState.selection, pathList); + const selectedPathPointState = getSelectedPathPointState( + editorState.selection, + selectedPath + ); + const selectedPathPoint = selectedPathPointState?.point ?? null; + const selectedPathPointIndex = selectedPathPointState?.index ?? null; const selectedEntity = getSelectedEntity(editorState.selection, entityList); const selectedModelInstance = getSelectedModelInstance( editorState.selection, @@ -4338,6 +4344,22 @@ export function App({ store, initialStatusMessage }: AppProps) { `Selected ${getPathLabelById(selection.ids[0], pathList)} from the ${source}${suffix}.` ); break; + case "pathPoint": { + const pointIndex = + selectedPath !== null && selectedPath.id === selection.pathId + ? getScenePathPointIndex(selectedPath, selection.pointId) + : getScenePathPointIndex( + editorState.document.paths[selection.pathId] ?? { + points: [] + }, + selection.pointId + ); + + setStatusMessage( + `Selected path point ${pointIndex === -1 ? selection.pointId : pointIndex + 1} on ${getPathLabelById(selection.pathId, pathList)} from the ${source}${suffix}.` + ); + break; + } case "entities": setStatusMessage( `Selected ${getEntityDisplayLabelById(selection.ids[0], editorState.document.entities, editorState.document.assets)} from the ${source}${suffix}.`