diff --git a/src/app/App.tsx b/src/app/App.tsx index 0303d7d0..2f314042 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -4295,6 +4295,11 @@ export function App({ store, initialStatusMessage }: AppProps) { `Selected ${BOX_VERTEX_LABELS[selection.vertexId]} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.` ); break; + case "paths": + setStatusMessage( + `Selected ${getPathLabelById(selection.ids[0], pathList)} from the ${source}${suffix}.` + ); + break; case "entities": setStatusMessage( `Selected ${getEntityDisplayLabelById(selection.ids[0], editorState.document.entities, editorState.document.assets)} from the ${source}${suffix}.` @@ -7880,6 +7885,35 @@ export function App({ store, initialStatusMessage }: AppProps) { } }; + const applyPathNameChange = () => { + if (selectedPath === null) { + setStatusMessage("Select a path before renaming it."); + return; + } + + const nextName = normalizeScenePathName(pathNameDraft); + + if (selectedPath.name === nextName) { + return; + } + + try { + store.executeCommand( + createSetPathNameCommand({ + pathId: selectedPath.id, + name: pathNameDraft + }) + ); + setStatusMessage( + nextName === undefined + ? "Cleared the authored path name." + : `Renamed path to ${nextName}.` + ); + } catch (error) { + setStatusMessage(getErrorMessage(error)); + } + }; + const applyEntityNameChange = () => { if (selectedEntity === null) { setStatusMessage("Select an entity before renaming it.");