From 30120f370916e940b3fb838fbf153748894e3de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=A4ume?= Date: Fri, 17 May 2024 15:50:53 +0200 Subject: [PATCH] #26: Bugfix --- .../java/de/hitec/nhplus/medication/IngredientListCell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/hitec/nhplus/medication/IngredientListCell.java b/src/main/java/de/hitec/nhplus/medication/IngredientListCell.java index 5156e4d..d5e684b 100644 --- a/src/main/java/de/hitec/nhplus/medication/IngredientListCell.java +++ b/src/main/java/de/hitec/nhplus/medication/IngredientListCell.java @@ -40,7 +40,7 @@ public class IngredientListCell extends ListCell { BUTTON_PADDING_Y, BUTTON_PADDING_X )); - deleteButton.setOnAction(event -> getListView().getItems().remove(this)); + deleteButton.setOnAction(event -> getListView().getItems().remove(getItem())); // Calculate Delete Button Width Text textNode = new Text(deleteButton.getText());