From c141365767662bae7d6723566c91ca4252d55736 Mon Sep 17 00:00:00 2001 From: Edwin Kempin Date: Fri, 22 Jun 2012 08:54:20 +0200 Subject: [PATCH] Avoid that permalink is displayed multiple times after restore/abandon Each time a change was restored/abandoned another permalink for the change was added to the CommitMessageBlock. Avoid this by clearing the permalinkPanel before adding the permaLink. This also ensures that the permalink is removed when the changeId is null. Change-Id: I3a58094bdea3a5121957bd2d653b5c92dfcac457 Signed-off-by: Edwin Kempin --- .../com/google/gerrit/client/changes/CommitMessageBlock.java | 1 + 1 file changed, 1 insertion(+) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/CommitMessageBlock.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/CommitMessageBlock.java index 561b43f6f8..6a364e043e 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/CommitMessageBlock.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/CommitMessageBlock.java @@ -76,6 +76,7 @@ public class CommitMessageBlock extends Composite { } } + permalinkPanel.clear(); if (changeId != null) { permalinkPanel.add(new ChangeLink(Util.C.changePermalink(), changeId)); permalinkPanel.add(new CopyableLabel(ChangeLink.permalink(changeId), false));