From ea3da3a1c939038c5ed564e8e8f10f1873466a94 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 12 May 2026 22:10:41 +0200 Subject: [PATCH] Implement deletion functionality for multiple selected path points --- src/app/App.tsx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 4da4a914..750bcd93 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -2690,6 +2690,12 @@ export function App({ selectedPath ); const selectedPathPointIndex = selectedPathPointState?.index ?? null; + const selectedPathPointCount = + editorState.selection.kind === "pathPoints" + ? editorState.selection.pointIds.length + : editorState.selection.kind === "pathPoint" + ? 1 + : 0; const selectedEntity = getSelectedEntity(editorState.selection, entityList); const selectedModelInstance = getSelectedModelInstance( editorState.selection, @@ -11142,6 +11148,25 @@ export function App({ }; const handleDeleteSelectedSceneItem = () => { + if (editorState.selection.kind === "pathPoints") { + try { + store.executeCommand( + createDeletePathPointsCommand({ + pathId: editorState.selection.pathId, + pointIds: editorState.selection.pointIds, + label: "Delete path points" + }) + ); + setStatusMessage( + `Removed ${editorState.selection.pointIds.length} selected path points.` + ); + return true; + } catch (error) { + setStatusMessage(getErrorMessage(error)); + return false; + } + } + const selectedPathPoint = getSingleSelectedPathPoint(editorState.selection); if (selectedPathPoint !== null) {