eric6/UI/PythonDisViewer.py

changeset 8260
2161475d9639
parent 8235
78e6d29eb773
child 8265
0090cfa83159
diff -r 2bbec88047dd -r 2161475d9639 eric6/UI/PythonDisViewer.py
--- a/eric6/UI/PythonDisViewer.py	Wed Apr 21 19:40:50 2021 +0200
+++ b/eric6/UI/PythonDisViewer.py	Thu Apr 22 18:02:47 2021 +0200
@@ -399,13 +399,12 @@
         @param itm reference to the item to be updated
         @type QTreeWidgetItem
         """
-        if itm.childCount():
-            endLine = max(
-                itm.child(index).data(0, self.EndLineRole)
-                for index in range(itm.childCount())
-            )
-        else:
-            endLine = itm.data(0, self.StartLineRole)
+        endLine = (
+            max(itm.child(index).data(0, self.EndLineRole)
+                for index in range(itm.childCount()))
+            if itm.childCount() else
+            itm.data(0, self.StartLineRole)
+        )
         itm.setData(0, self.EndLineRole, endLine)
     
     def __createCodeInfo(self, co):

eric ide

mercurial