EditPreferencesBox: Don't try to close panel on setting screen

EditPreferencesBox is shown on two different locations, in inline editor
and in setting screen. Only in inline editor the popup panel can be
closed. On setting screen it is not a popup panel but a part of the
screen and cannot be closed. This fixes the ClassCastException, thrown
when trying to cast the screen to the PopupPanel.

Bug: Issue 8250
Change-Id: Ia693a664d69cc553502343af4e50a455b319fe42
This commit is contained in:
David Ostrovsky
2018-02-03 00:08:10 +01:00
parent 522a7b5d1b
commit f23388fdce

View File

@@ -282,7 +282,9 @@ public class EditPreferencesBox extends Composite {
Gerrit.setEditPreferences(p.copyTo(new EditPreferencesInfo()));
}
});
close();
if (view != null) {
close();
}
}
@UiHandler("close")