JDK-8248389 : Adding a TreeItem before the selected item does not correctly update the selection
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: openjfx14
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2020-06-26
  • Updated: 2020-06-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
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();
    }