minor updates

This commit is contained in:
2026-02-20 22:06:23 +01:00
parent 40a90c7ff5
commit c49f28da26
3 changed files with 22 additions and 17 deletions

View File

@@ -341,10 +341,11 @@ class TreeView(MultipleInstance):
return self
def _start_rename(self, node_id: str):
"""Start renaming a node (sets editing state)."""
"""Start renaming a node (sets editing state and selection)."""
if node_id not in self._state.items:
raise ValueError(f"Node {node_id} does not exist")
self._state.selected = node_id
self._state.editing = node_id
return self