mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
faster filtering
This commit is contained in:
parent
9a72f2bafc
commit
5a4a888c22
2 changed files with 7 additions and 3 deletions
|
|
@ -173,6 +173,9 @@ class ProductsModel(QtGui.QStandardItemModel):
|
|||
self._last_folder_ids
|
||||
)
|
||||
|
||||
def get_task_tags_by_id(self, task_id):
|
||||
return self._last_task_tags_by_task_id.get(task_id, set())
|
||||
|
||||
def get_version_items_by_product_id(self, product_id: str):
|
||||
product_item = self._product_items_by_id.get(product_id)
|
||||
if product_item is None:
|
||||
|
|
|
|||
|
|
@ -129,9 +129,10 @@ class ProductsProxyModel(RecursiveSortFilterProxyModel):
|
|||
return False
|
||||
|
||||
value_s = index.data(role)
|
||||
for value in value_s.split("|"):
|
||||
if value in filter_value:
|
||||
return True
|
||||
if value_s:
|
||||
for value in value_s.split("|"):
|
||||
if value in filter_value:
|
||||
return True
|
||||
return False
|
||||
|
||||
def lessThan(self, left, right):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue