From 251bc02840a2e722a6cf660e4adde0e63d3d2de1 Mon Sep 17 00:00:00 2001 From: Christian Halstrick Date: Tue, 6 Dec 2011 23:10:03 +0100 Subject: [PATCH] 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 Signed-off-by: Christian Halstrick --- .../src/org/eclipse/jgit/revplot/PlotCommitList.java | 2 ++ 1 file changed, 2 insertions(+) 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 e8263c5a9..f66e5e7ef 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 extends if (newPos == -1) newPos = positionsAllocated++; freePositions.add(commit.lane.getPosition()); + activeLanes.remove(commit.lane); commit.lane.position = newPos; + activeLanes.add(commit.lane); } }