fix: no null pointer exceptions if the user can't see anything :)
This commit is contained in:
parent
603de94870
commit
c2fa31aa9f
1 changed files with 1 additions and 1 deletions
|
|
@ -203,8 +203,8 @@ public class FoodpalApplicationCtrl implements LocaleAware {
|
||||||
// Select first recipe in the list by default
|
// Select first recipe in the list by default
|
||||||
if (!recipes.isEmpty()) {
|
if (!recipes.isEmpty()) {
|
||||||
recipeList.getSelectionModel().selectFirst();
|
recipeList.getSelectionModel().selectFirst();
|
||||||
detailsScreen.visibleProperty().set(true);
|
|
||||||
}
|
}
|
||||||
|
detailsScreen.visibleProperty().set(!recipes.isEmpty());
|
||||||
}
|
}
|
||||||
private void printError(String msg) {
|
private void printError(String msg) {
|
||||||
Alert alert = new Alert(Alert.AlertType.ERROR);
|
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue