-
Bug
-
Resolution: Unresolved
-
P4
-
jfx14
Adding a TreeItem before the selected item does not correctly update the selection. Below is a test scenario added to TreeTableViewTest. For now It is ignored using this JBS issue.
@Test public void testSelectionUpdatesCorrectlyAfterAddingAnItemBeforeSelectedItem() {
setupForPermutationTest();
TreeItem<String> parentOfSelectedTreeItem = ((TreeItem<String>)sm.getSelectedItem()).getParent();
int indexOfSelectedItem = parentOfSelectedTreeItem.getChildren().indexOf(sm.getSelectedItem());
if (indexOfSelectedItem > 0) {
indexOfSelectedItem--;
}
parentOfSelectedTreeItem.getChildren().add(indexOfSelectedItem, new TreeItem("AddingOne"));
verifySelectionAfterPermutation();
}
@Test public void testSelectionUpdatesCorrectlyAfterAddingAnItemBeforeSelectedItem() {
setupForPermutationTest();
TreeItem<String> parentOfSelectedTreeItem = ((TreeItem<String>)sm.getSelectedItem()).getParent();
int indexOfSelectedItem = parentOfSelectedTreeItem.getChildren().indexOf(sm.getSelectedItem());
if (indexOfSelectedItem > 0) {
indexOfSelectedItem--;
}
parentOfSelectedTreeItem.getChildren().add(indexOfSelectedItem, new TreeItem("AddingOne"));
verifySelectionAfterPermutation();
}
- relates to
-
JDK-8248217 ☂ TreeTableView selection issues
- Open