Steps to reproduce:
1. Create listview
2. Add a listener to the listview.getSelectionModel().getSelectedIndices()
3. Add an item to the list
4. Remove the only item from the list
The listener will be called but if you call listview.getSelectionModel().getSelectedIndices(), it returns a list of size 1 containing -1. I believe it should be an empty list.
Related to this, a call to listview.getSelectionModel().getSelectedItems() returns a list of size 1 containing null. This shold be an empty list as well.
All works as expected if the list contains more than one item after the removal.
1. Create listview
2. Add a listener to the listview.getSelectionModel().getSelectedIndices()
3. Add an item to the list
4. Remove the only item from the list
The listener will be called but if you call listview.getSelectionModel().getSelectedIndices(), it returns a list of size 1 containing -1. I believe it should be an empty list.
Related to this, a call to listview.getSelectionModel().getSelectedItems() returns a list of size 1 containing null. This shold be an empty list as well.
All works as expected if the list contains more than one item after the removal.