Improved graph visualization

This commit is contained in:
Abdelilah El Aissaoui 2022-11-05 00:25:45 +01:00
parent 113ff9339f
commit 4a90e1c757

View File

@ -112,8 +112,9 @@ class GraphCommitList : RevCommitList<GraphNode>() {
lengthOfReservedLane = length lengthOfReservedLane = length
} }
} else { } else {
val children = currCommit.children.sortedBy { it.lane.position }
for (i in 0 until nChildren) { for (i in 0 until nChildren) {
val c: GraphNode = currCommit.children[i] val c: GraphNode = children[i]
if (c.getGraphParent(0) === currCommit) { if (c.getGraphParent(0) === currCommit) {
if (c.lane.position < 0) if (c.lane.position < 0)
println("c.lane.position is invalid (${c.lane.position})") println("c.lane.position is invalid (${c.lane.position})")
@ -126,6 +127,8 @@ class GraphCommitList : RevCommitList<GraphNode>() {
reservedLane = c.lane reservedLane = c.lane
childOnReservedLane = c childOnReservedLane = c
lengthOfReservedLane = length lengthOfReservedLane = length
break
} }
} }
} }