eric6/E5Gui/E5TreeWidget.py

changeset 8228
772103b14c18
parent 8218
7c09585bd960
child 8234
fcb6b4b96274
--- a/eric6/E5Gui/E5TreeWidget.py	Mon Apr 12 19:05:23 2021 +0200
+++ b/eric6/E5Gui/E5TreeWidget.py	Mon Apr 12 19:21:40 2021 +0200
@@ -213,12 +213,13 @@
             while firstItm:
                 if lFilter in firstItm.text(0).lower():
                     firstItm.setHidden(False)
-                elif not firstItm.parent() and not belowItm:
+                elif (
+                    not firstItm.parent() and
+                    (not belowItm or not belowItm.parent())
+                ):
                     firstItm.setHidden(True)
                 elif not belowItm:
                     break
-                elif not firstItm.parent() and not belowItm.parent():
-                    firstItm.setHidden(True)
                 
                 topLvlIndex += 1
                 firstItm = self.topLevelItem(topLvlIndex)

eric ide

mercurial