summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2011-12-06 23:10:03 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2011-12-06 23:10:03 +0100
commit251bc02840a2e722a6cf660e4adde0e63d3d2de1 (patch)
tree039cf8e5fb60f477d063a662777348d25e2f9765
parent9e1b64bd3e0608abaa24f665f899cf3a0467eb0b (diff)
downloadjgit-251bc02840a2e722a6cf660e4adde0e63d3d2de1.tar.gz
jgit-251bc02840a2e722a6cf660e4adde0e63d3d2de1.zip
Fix history rendering not to occupy too many lanes
There was a bug in history rendering which caused jgit to use too many lanes in case lanes get repositioned. Looking at commit 90c11cbaeb83ee9b02238cbd2c0e5bcf68068772 in JGit was one example. Vadim Dmitriev found the problem and the solution. Bug: 365460 Change-Id: I6024265b7a593dcfd4fc612d0baf6652a0092ff4 Also-by: Vadim Dmitriev <dmgloss@mail.ru> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
index e8263c5a93..f66e5e7ef9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
@@ -232,7 +232,9 @@ public class PlotCommitList<L extends PlotLane> extends
if (newPos == -1)
newPos = positionsAllocated++;
freePositions.add(commit.lane.getPosition());
+ activeLanes.remove(commit.lane);
commit.lane.position = newPos;
+ activeLanes.add(commit.lane);
}
}