Skip to content
Permalink
Browse files

[processing] search also show children in config

  • Loading branch information
3nids committed Feb 6, 2018
1 parent 3b17d5a commit 9389be83c612923bc0cae905b71bb13d593953af
Showing with 6 additions and 6 deletions.
  1. +6 −6 python/plugins/processing/gui/ConfigDialog.py
@@ -155,19 +155,19 @@ def textChanged(self, text=None):
self.tree.collapseAll()
return False

def _filterItem(self, item, text):
def _filterItem(self, item, text, forceShow=False):
if item.hasChildren():
show = isinstance(item, QStandardItem) and bool(text) and (text in item.text().lower())
show = forceShow or isinstance(item, QStandardItem) and bool(text) and (text in item.text().lower())
for i in range(item.rowCount()):
child = item.child(i)
show = self._filterItem(child, text) or show
show = self._filterItem(child, text, forceShow) or show
self.tree.setRowHidden(item.row(), item.index().parent(), not show)
return show

elif isinstance(item, QStandardItem):
hide = bool(text) and (text not in item.text().lower())
self.tree.setRowHidden(item.row(), item.index().parent(), hide)
return not hide
show = forceShow or bool(text) and (text in item.text().lower())
self.tree.setRowHidden(item.row(), item.index().parent(), not show)
return show

def fillTree(self):
self.fillTreeUsingProviders()

0 comments on commit 9389be8

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