eric6/E5Gui/E5TreeWidget.py

changeset 8228
772103b14c18
parent 8218
7c09585bd960
child 8234
fcb6b4b96274
equal deleted inserted replaced
8227:349308e84eeb 8228:772103b14c18
211 belowItm = self.itemBelow(firstItm) 211 belowItm = self.itemBelow(firstItm)
212 topLvlIndex = 0 212 topLvlIndex = 0
213 while firstItm: 213 while firstItm:
214 if lFilter in firstItm.text(0).lower(): 214 if lFilter in firstItm.text(0).lower():
215 firstItm.setHidden(False) 215 firstItm.setHidden(False)
216 elif not firstItm.parent() and not belowItm: 216 elif (
217 not firstItm.parent() and
218 (not belowItm or not belowItm.parent())
219 ):
217 firstItm.setHidden(True) 220 firstItm.setHidden(True)
218 elif not belowItm: 221 elif not belowItm:
219 break 222 break
220 elif not firstItm.parent() and not belowItm.parent():
221 firstItm.setHidden(True)
222 223
223 topLvlIndex += 1 224 topLvlIndex += 1
224 firstItm = self.topLevelItem(topLvlIndex) 225 firstItm = self.topLevelItem(topLvlIndex)
225 belowItm = self.itemBelow(firstItm) 226 belowItm = self.itemBelow(firstItm)
226 else: 227 else:

eric ide

mercurial