diff options
author | Shawn O. Pearce <sop@google.com> | 2011-05-19 16:22:14 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2011-05-19 16:32:15 -0700 |
commit | 4fdb29c14ba507e766831134c982514e82e083a0 (patch) | |
tree | 5bab74b1db0c8b48a1fb1cfffbd49b5be3423b0d | |
parent | 237174c2766bea7357194192a83c62b3f24b42de (diff) |
Fix assertion caused by early key-rebinding in ChangeScreen
Keys cannot be registered until the prior screen has dropped its key
bindings. Move the activation of the current patch set into the
registerKeys() routine of ChangeScreen, where its legal to register
(or re-register) the key bindings.
Change-Id: I24bba5a09bd9f1452e01bdb5685e2b332aa51106
Signed-off-by: Shawn O. Pearce <sop@google.com>
-rw-r--r-- | gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeScreen.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeScreen.java index 423fcff6e4..edb25e4b60 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeScreen.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeScreen.java @@ -148,6 +148,9 @@ public class ChangeScreen extends Screen { super.registerKeys(); regNavigation = GlobalKey.add(this, keysNavigation); regAction = GlobalKey.add(this, keysAction); + if (openPatchSetId != null) { + patchSetsBlock.activate(openPatchSetId); + } } public void refresh() { @@ -318,9 +321,6 @@ public class ChangeScreen extends Screen { } patchSetsBlock.display(detail, diffBaseId); - if (openPatchSetId != null) { - patchSetsBlock.activate(openPatchSetId); - } addComments(detail); // If any dependency change is still open, show our dependency list. |