eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py

changeset 8259
2bbec88047dd
parent 8243
cc717c2ae956
child 8273
698ae46f40a4
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Wed Apr 21 17:56:12 2021 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Wed Apr 21 19:40:50 2021 +0200
@@ -947,12 +947,13 @@
                 self.__childrenInfo[parent].append(int(rev))
         itm.setData(0, self.__incomingRole, self.commandMode == "incoming")
         
-        if self.logTree.topLevelItemCount() > 1:
-            topedges = self.logTree.topLevelItem(
+        topedges = (
+            self.logTree.topLevelItem(
                 self.logTree.indexOfTopLevelItem(itm) - 1
             ).data(0, self.__edgesRole)
-        else:
-            topedges = None
+            if self.logTree.topLevelItemCount() > 1 else
+            None
+        )
         
         icon = self.__generateIcon(column, color, edges, topedges,
                                    QColor(self.__branchColor(branches[0])),

eric ide

mercurial