faster filtering

This commit is contained in:
Jakub Trllo 2025-06-12 18:24:03 +02:00
parent 9a72f2bafc
commit 5a4a888c22
2 changed files with 7 additions and 3 deletions

View file

@ -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:

View file

@ -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):