Skip to content

Commit

Permalink
Fix for possible crash in SceneChooserController.java
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoo980 committed Dec 18, 2023
1 parent d399e53 commit 555cebd
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ public class SceneChooserController implements Initializable {
alert.setTitle("Delete Scene");
alert.setContentText(String.format("Are you sure you want to delete the scene %s? "
+ "All files for the scene, except snapshot images, will be deleted.", scene.sceneName));
if (alert.showAndWait().get() == ButtonType.OK) {
Scene.delete(scene.sceneName, scene.sceneDirectory);
sceneTbl.getItems().remove(sceneTbl.getSelectionModel().getSelectedItem());
}
alert.showAndWait()
.ifPresent(result ->
if (result == ButtonType.OK) {
Scene.delete(scene.sceneName, scene.sceneDirectory);
sceneTbl.getItems().remove(sceneTbl.getSelectionModel().getSelectedItem());
}
);
}
});

Expand Down

0 comments on commit 555cebd

Please sign in to comment.