Skip to content

Commit

Permalink
WIP treeview: faster all()
Browse files Browse the repository at this point in the history
  • Loading branch information
ragardner committed Jun 18, 2024
1 parent f87656a commit 1a6a39c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tksheet/row_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ def ancestors_all_open(self, iid: str, stop_at: str | Node = "") -> bool:
if iid not in self.tree_open_ids:
return False
return True
return all(iid in self.tree_open_ids for iid in self.get_iid_ancestors(iid))
return all(map(self.tree_open_ids.__contains__, self.get_iid_ancestors(iid)))

def get_iid_ancestors(self, iid: str) -> Generator[str]:
if self.tree[iid].parent:
Expand Down

0 comments on commit 1a6a39c

Please sign in to comment.