eric6/E5Gui/E5TreeWidget.py

changeset 8234
fcb6b4b96274
parent 8228
772103b14c18
child 8268
6b8128e0c9d1
diff -r bad78a592cc2 -r fcb6b4b96274 eric6/E5Gui/E5TreeWidget.py
--- a/eric6/E5Gui/E5TreeWidget.py	Tue Apr 13 17:49:05 2021 +0200
+++ b/eric6/E5Gui/E5TreeWidget.py	Tue Apr 13 18:02:59 2021 +0200
@@ -269,16 +269,10 @@
         
         @param parent parent item to iterate (QTreeWidgetItem)
         """
-        if parent:
-            count = parent.childCount()
-        else:
-            count = self.topLevelItemCount()
+        count = parent.childCount() if parent else self.topLevelItemCount()
         
         for index in range(count):
-            if parent:
-                itm = parent.child(index)
-            else:
-                itm = self.topLevelItem(index)
+            itm = parent.child(index) if parent else self.topLevelItem(index)
             
             if itm.childCount() == 0:
                 self.__allTreeItems.append(itm)

eric ide

mercurial