From 6b568302e340308288611ce733630282c62483ff Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 13 Apr 2026 21:23:30 +0200 Subject: [PATCH] Update App.tsx to handle selectedPath changes --- src/app/App.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index 994437be..b560d3a8 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -2361,6 +2361,10 @@ export function App({ store, initialStatusMessage }: AppProps) { setBrushNameDraft(selectedBrush?.name ?? ""); }, [selectedBrush]); + useEffect(() => { + setPathNameDraft(selectedPath?.name ?? ""); + }, [selectedPath]); + useEffect(() => { setEntityNameDraft(selectedEntity?.name ?? ""); }, [selectedEntity]); @@ -2369,6 +2373,14 @@ export function App({ store, initialStatusMessage }: AppProps) { setModelInstanceNameDraft(selectedModelInstance?.name ?? ""); }, [selectedModelInstance]); + useEffect(() => { + setPathPointDrafts( + selectedPath === null + ? [] + : selectedPath.points.map((point) => createVec3Draft(point.position)) + ); + }, [selectedPath]); + useEffect(() => { if (selectedBrush === null) { setPositionDraft(createVec3Draft(DEFAULT_BOX_BRUSH_CENTER));