mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
a little bit faster expanding
This commit is contained in:
parent
b388441342
commit
4f68e953d5
1 changed files with 3 additions and 5 deletions
|
|
@ -400,12 +400,12 @@ class HierarchyView(QtWidgets.QTreeView):
|
|||
indexes (list): List of QModelIndex that should be expanded.
|
||||
"""
|
||||
|
||||
item_ids = set()
|
||||
process_queue = Queue()
|
||||
for index in indexes:
|
||||
if index.column() == 0:
|
||||
process_queue.put(index)
|
||||
|
||||
item_ids = set()
|
||||
while not process_queue.empty():
|
||||
index = process_queue.get()
|
||||
item_id = index.data(IDENTIFIER_ROLE)
|
||||
|
|
@ -413,11 +413,9 @@ class HierarchyView(QtWidgets.QTreeView):
|
|||
continue
|
||||
item_ids.add(item_id)
|
||||
|
||||
item = self._source_model._items_by_id[item_id]
|
||||
if not self.isExpanded(index):
|
||||
self.expand(index)
|
||||
self.expand(index)
|
||||
|
||||
for row in range(item.rowCount()):
|
||||
for row in range(self._source_model.rowCount(index)):
|
||||
process_queue.put(self._source_model.index(
|
||||
row, 0, index
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue