File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
python/plugins/processing/gui Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -155,19 +155,19 @@ def textChanged(self, text=None):
155
155
self .tree .collapseAll ()
156
156
return False
157
157
158
- def _filterItem (self , item , text ):
158
+ def _filterItem (self , item , text , forceShow = False ):
159
159
if item .hasChildren ():
160
- show = isinstance (item , QStandardItem ) and bool (text ) and (text in item .text ().lower ())
160
+ show = forceShow or isinstance (item , QStandardItem ) and bool (text ) and (text in item .text ().lower ())
161
161
for i in range (item .rowCount ()):
162
162
child = item .child (i )
163
- show = self ._filterItem (child , text ) or show
163
+ show = self ._filterItem (child , text , forceShow ) or show
164
164
self .tree .setRowHidden (item .row (), item .index ().parent (), not show )
165
165
return show
166
166
167
167
elif isinstance (item , QStandardItem ):
168
- hide = bool (text ) and (text not in item .text ().lower ())
169
- self .tree .setRowHidden (item .row (), item .index ().parent (), hide )
170
- return not hide
168
+ show = forceShow or bool (text ) and (text in item .text ().lower ())
169
+ self .tree .setRowHidden (item .row (), item .index ().parent (), not show )
170
+ return show
171
171
172
172
def fillTree (self ):
173
173
self .fillTreeUsingProviders ()
You can’t perform that action at this time.
0 commit comments