Fix edge case in AbstractListCell

Clear the cell if the item is updated with a null value.
This commit is contained in:
Kai S. K. Engelbart 2020-08-03 22:07:12 +02:00 committed by GitHub
parent 615c317598
commit efaa3eb8c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,8 @@ public abstract class AbstractListCell<T, U extends Node> extends ListCell<T> {
if (!(empty || item == null)) { if (!(empty || item == null)) {
setCursor(Cursor.HAND); setCursor(Cursor.HAND);
setGraphic(renderItem(item)); setGraphic(renderItem(item));
} else {
setGraphic(null);
} }
} }