Skip to content

Commit

Permalink
clean: remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Sep 21, 2024
1 parent 84904a1 commit 7f656e5
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions dooit/ui/widgets/trees/model_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,24 +159,6 @@ def _get_parent(self, id: str) -> Optional[ModelType]:
def _get_children(self, id: str) -> Iterable[ModelType]:
raise NotImplementedError

def _insert_nodes(self, index: int, items: Iterable[Option]) -> None:
if not items:
return

highlighted = self.highlighted
opts = self._options
opts = opts[:index] + list(items) + opts[index:]

self.clear_options()
self.add_options(opts)
self.highlighted = highlighted

def add_nodes(self, *items: Option, index: Optional[int] = None) -> None:
if index is None:
index = self.option_count

self._insert_nodes(index, items)

@refresh_tree
def _expand_node(self, _id: str) -> None:
self.expanded_nodes[_id] = True
Expand Down

0 comments on commit 7f656e5

Please sign in to comment.