Yuya Nishihara committed 7b23528

graph: adapt comment about common edges to "importance" attribute

  • Participants
  • Parent commits 23c4899

Comments (0)

Files changed (2)

File tortoisehg/hgqt/

     def importance(self):
+        """Sort key of overlapped edges; highest one should be drawn last"""
+        # prefer parent-child relation and younger (i.e. longer) edge
         return -self[3], -self[2]
 class GraphNode(object):

File tortoisehg/hgqt/

             ymid = (y1 + y4)/2
             y3 = y1 + 3 * (y4 - y1)/4
-            # merging lines should be drawn last (=lowest linktype)
             lines = sorted(((isactive(e), p, e) for p, e in lines),
                            key=lambda ape: (ape[0], ape[2].importance))