Skip to content
Permalink
Browse files

[processing] Also filter using algorithm short descriptions

  • Loading branch information
nyalldawson committed May 16, 2018
1 parent 5edcc64 commit b98f8f1d37abc62c310b1cb6de1e844e98a2e484
@@ -160,8 +160,10 @@ def _filterItem(self, item, text):
elif isinstance(item, TreeAlgorithmItem):
# hide if every part of text is not contained somewhere in either the item text or item user role
item_text = [item.text(0).lower(), item.data(0, ProcessingToolbox.NAME_ROLE).lower()]
item_text.append(item.alg.id())
item_text.extend(item.data(0, ProcessingToolbox.TAG_ROLE))
item_text.append(item.alg.id().lower())
if item.alg.shortDescription():
item_text.append(item.alg.shortDescription().lower())
item_text.extend([t.lower() for t in item.data(0, ProcessingToolbox.TAG_ROLE)])

hide = bool(text) and not all(
any(part in t for t in item_text)
@@ -606,8 +606,10 @@ def _filterItem(self, item, text):
# hide if every part of text is not contained somewhere in either the item text or item user role
item_text = [item.text(0).lower(), item.data(0, ModelerDialog.NAME_ROLE).lower()]
if isinstance(item, TreeAlgorithmItem):
item_text.append(item.alg.id())
item_text.extend(item.data(0, ModelerDialog.TAG_ROLE))
item_text.append(item.alg.id().lower())
if item.alg.shortDescription():
item_text.append(item.alg.shortDescription().lower())
item_text.extend([t.lower() for t in item.data(0, ModelerDialog.TAG_ROLE)])

hide = bool(text) and not all(
any(part in t for t in item_text)

0 comments on commit b98f8f1

Please sign in to comment.
You can’t perform that action at this time.