Skip to content

Commit 3add80e

Browse files
committed
Fix open twice bug
1 parent 6433615 commit 3add80e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ui/src/main/java/edu/wpi/grip/ui/AboutDialogController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ void initialize() {
7272
assert documentationRectangle != null : "fx:id=\"documentationRectangle\" was not injected: check your FXML file 'AboutDialog.fxml'.";
7373
assert documentationText != null : "fx:id=\"documentationText\" was not injected: check your FXML file 'AboutDialog.fxml'.";
7474

75-
7675
versionNumberText.setText("Version " + edu.wpi.grip.core.Main.class.getPackage().getImplementationVersion());
7776
}
7877
}

ui/src/main/java/edu/wpi/grip/ui/MainWindowController.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,11 @@ public void showProjectSettingsEditor() {
217217
@FXML
218218
public void showProjectAboutDialog() throws IOException {
219219
Stage aboutDialogStage = new Stage();
220-
aboutDialogStage.setScene(new Scene(aboutPane));
220+
if (aboutPane.getScene() != null) {
221+
aboutDialogStage.setScene(aboutPane.getScene());
222+
} else {
223+
aboutDialogStage.setScene(new Scene(aboutPane));
224+
}
221225
aboutDialogStage.initModality(Modality.APPLICATION_MODAL);
222226
aboutDialogStage.show();
223227
}

0 commit comments

Comments
 (0)