Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] search also show children in config
  • Loading branch information
3nids committed Feb 6, 2018
1 parent 3b17d5a commit 9389be8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/plugins/processing/gui/ConfigDialog.py
Expand Up @@ -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()
Expand Down

0 comments on commit 9389be8

Please sign in to comment.