There is a problem in the following operation:
listView.getItems().removeAll(listView.getSelectionModel().getSelectedItems())
If only the first item is selected, all items are removed from the list. Run the attached app to reproduce the issue.
listView.getItems().removeAll(listView.getSelectionModel().getSelectedItems())
If only the first item is selected, all items are removed from the list. Run the attached app to reproduce the issue.