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>
This commit is contained in:
Shawn O. Pearce
2011-05-19 16:22:14 -07:00
parent 237174c276
commit 4fdb29c14b

View File

@@ -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.