From a007b92c31949108fa9bda07c47e3feaf6a0184a Mon Sep 17 00:00:00 2001 From: Bruce Zu Date: Tue, 26 Mar 2013 14:15:28 +0800 Subject: [PATCH] Fix: 'Download' icons on diff UI cannot work correctly On SideBySide diff UI the 'Download' icon of the right version does not work when the left version is not 'Base', get the left version even if clicking on the right icon; 'Download' icon of the left version always gets to be the 'Base' version, even if not comparing with 'Base' at the left side. These bugs can also be found on Unified UI. Fixed. Change-Id: I903d03460d4eff54ab1e92e4025b4414f8d33413 --- .../com/google/gerrit/client/patches/PatchSetSelectBox.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 7f7a36e353..df12b706aa 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 @@ -190,10 +190,10 @@ public class PatchSetSelectBox extends Composite { return null; } - Patch.Key key = - (idSideA == null) ? patchKey : (new Patch.Key(idSideA, patchKey.get())); + Patch.Key key = (idActive == null) ? // + patchKey : (new Patch.Key(idActive, patchKey.get())); - String sideURL = (side == Side.A) ? "1" : "0"; + String sideURL = (idActive == null) ? "1" : "0"; final String base = GWT.getHostPageBaseURL() + "cat/"; Image image = new Image(Gerrit.RESOURCES.downloadIcon());