Improved command management to reduce the number of instances

This commit is contained in:
2025-12-21 11:14:02 +01:00
parent 9f69a6bc5b
commit 2f808ed226
8 changed files with 100 additions and 19 deletions

View File

@@ -267,6 +267,12 @@ class TreeView(MultipleInstance):
self._state.update(state)
return self
def get_bag(self, node_id: str):
try:
return self._state.items[node_id].bag
except KeyError:
return None
def _toggle_node(self, node_id: str):
"""Toggle expand/collapse state of a node."""
if node_id in self._state.opened: