From e5ade76a81fb632edca062f570fb67b565fb96b4 Mon Sep 17 00:00:00 2001 From: Edwin Kempin Date: Wed, 8 Aug 2012 09:34:04 +0200 Subject: [PATCH] Display links in PatchSetSelectBox only once On navigation to the next/previous patch, the links in the PatchSetSelectBox of the old patch are show twice until the new patch is loaded. This is especially bad if the loading of the next/previous patch fails with an exception so that the screen stays with the old patch. Retrying in this situation to navigate to the next/previous patch adds another instance of the links to the PatchSetSelectBox. Change-Id: Ia5a4e2b12e22cf01ac76bd044977cbe024875595 Signed-off-by: Edwin Kempin --- .../com/google/gerrit/client/patches/PatchSetSelectBox.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchSetSelectBox.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchSetSelectBox.java index 484db7c192..5d4207f8ba 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchSetSelectBox.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchSetSelectBox.java @@ -90,6 +90,8 @@ public class PatchSetSelectBox extends Composite { this.idActive = (side == Side.A) ? idSideA : idSideB; this.links = new LinkedList(); + linkPanel.clear(); + if (screenType == PatchScreen.Type.UNIFIED) { sideMarker.setInnerText((side == Side.A) ? "(-)" : "(+)"); } else {