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 <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2012-06-22 08:54:20 +02:00
parent 8d08cafcc4
commit c141365767

View File

@@ -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));