Fix missing close handler and avoid nullPointer exception

This commit is contained in:
Manfred Karrer 2019-03-31 15:46:09 -05:00
parent fe646e5436
commit e624625bbb
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46
2 changed files with 3 additions and 2 deletions

View File

@ -144,7 +144,7 @@ public class ProposalDisplay {
private VBox linkWithIconContainer, comboBoxValueContainer, myVoteBox, voteResultBox;
private int votingBoxRowSpan;
private Optional<Runnable> navigateHandlerOptional;
private Optional<Runnable> navigateHandlerOptional = Optional.empty();
public ProposalDisplay(GridPane gridPane,
BsqFormatter bsqFormatter,
@ -647,7 +647,7 @@ public class ProposalDisplay {
}
public void onNavigate(Runnable navigateHandler) {
this.navigateHandlerOptional = Optional.of(navigateHandler);
navigateHandlerOptional = Optional.of(navigateHandler);
}
public int incrementAndGetGridRow() {

View File

@ -134,6 +134,7 @@ public class ProposalResultsWindow extends TabbedOverlay<ProposalResultsWindow>
proposalDisplay.createAllFields("", rowIndex, -Layout.FIRST_ROW_DISTANCE, proposal.getType(),
false, "last");
proposalDisplay.setEditable(false);
proposalDisplay.onNavigate(this::doClose);
proposalDisplay.applyProposalPayload(proposal);
proposalDisplay.applyEvaluatedProposal(evaluatedProposal);