From 0da9490a60e34689a80f0ab7a834dc092a4bd282 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Sat, 24 Jan 2026 14:43:21 +0100 Subject: [PATCH] fix: list cell now remembers the last ingredient selected --- .../main/java/client/scenes/recipe/IngredientListCell.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/client/scenes/recipe/IngredientListCell.java b/client/src/main/java/client/scenes/recipe/IngredientListCell.java index bdd60ab..6cfeaf7 100644 --- a/client/src/main/java/client/scenes/recipe/IngredientListCell.java +++ b/client/src/main/java/client/scenes/recipe/IngredientListCell.java @@ -135,7 +135,9 @@ public class IngredientListCell extends OrderedEditableListCell unitChoice) { - MenuButton ingredientSelect = new MenuButton(getLocaleString("app.prompt.select-ingredient")); + selectedIngredient.setValue(ingredient.getIngredient()); + MenuButton ingredientSelect = new MenuButton(selectedIngredient.get() == null ? + getLocaleString("app.prompt.select-ingredient") : selectedIngredient.get().getName()); HBox container = new HBox(amountInput, unitChoice, ingredientSelect); try { makeMenuItems(ingredientSelect, server.getIngredients(), Ingredient::getName, i -> {