Fixed uncommited changes parent node lane position
This commit is contained in:
parent
ba4c9596f8
commit
b63614d68d
@ -61,9 +61,11 @@ class GraphCommitList : RevCommitList<GraphNode>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun enter(index: Int, currCommit: GraphNode) {
|
override fun enter(index: Int, currCommit: GraphNode) {
|
||||||
|
var isUncommitedChangesNodeParent = false
|
||||||
if (currCommit.id == parentId) {
|
if (currCommit.id == parentId) {
|
||||||
graphCommit.graphParent = currCommit
|
graphCommit.graphParent = currCommit
|
||||||
currCommit.addChild(graphCommit, addFirst = true)
|
currCommit.addChild(graphCommit, addFirst = true)
|
||||||
|
isUncommitedChangesNodeParent = true
|
||||||
}
|
}
|
||||||
|
|
||||||
setupChildren(currCommit)
|
setupChildren(currCommit)
|
||||||
@ -100,6 +102,16 @@ class GraphCommitList : RevCommitList<GraphNode>() {
|
|||||||
var reservedLane: GraphLane? = null
|
var reservedLane: GraphLane? = null
|
||||||
var childOnReservedLane: GraphNode? = null
|
var childOnReservedLane: GraphNode? = null
|
||||||
var lengthOfReservedLane = -1
|
var lengthOfReservedLane = -1
|
||||||
|
|
||||||
|
|
||||||
|
if (isUncommitedChangesNodeParent) {
|
||||||
|
val length = laneLength[graphCommit.lane]
|
||||||
|
if (length != null) {
|
||||||
|
reservedLane = graphCommit.lane
|
||||||
|
childOnReservedLane = graphCommit
|
||||||
|
lengthOfReservedLane = length
|
||||||
|
}
|
||||||
|
} else {
|
||||||
for (i in 0 until nChildren) {
|
for (i in 0 until nChildren) {
|
||||||
val c: GraphNode = currCommit.children[i]
|
val c: GraphNode = currCommit.children[i]
|
||||||
if (c.getGraphParent(0) === currCommit) {
|
if (c.getGraphParent(0) === currCommit) {
|
||||||
@ -117,6 +129,7 @@ class GraphCommitList : RevCommitList<GraphNode>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (reservedLane != null) {
|
if (reservedLane != null) {
|
||||||
currCommit.lane = reservedLane
|
currCommit.lane = reservedLane
|
||||||
laneLength[reservedLane] = Integer.valueOf(lengthOfReservedLane + 1)
|
laneLength[reservedLane] = Integer.valueOf(lengthOfReservedLane + 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user