New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8193442: Removing TreeItem from a TreeTableView sometime changes selectedItem #753
Conversation
👋 Welcome back jpereda! A progress list of the required criteria for merging this PR into |
/reviewers 2 |
@kevinrushforth |
The GHA test failure on macOS was due to JDK-8282449 and not anything in this PR. I filed a new bug to skip the failing tests until that bug can be fixed. See PR #754. |
@kevinrushforth Thanks for the test fix. Do I need to add a change in order to pass the tests again? |
You would need to merge the latest master to pick up that fix, which will also trigger another GHA run. |
@kevinrushforth Thanks, that worked and the tests pass (as it was expected). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Apart from the bug id in title, you can use /issue
command to list additional issues this PR fixes.
/issue JDK-8187596 |
@jperedadnr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
In the process, I noticed that the ignored tests referred from JDK-8088157 were already passing, after removing some obsolete asserts, even without this PR.
After this is integrated, can you close JDK-8088157 as "Cannot reproduce"?
@jperedadnr This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 4 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 3bb2db1.
Your commit was automatically rebased without conflicts. |
@jperedadnr Pushed as commit 3bb2db1. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This PR fixes JDK-8193442, but also JDK-8187596, and verifies that the tests mentioned in JDK-8088157 are working (with a minor fix).
When removing an item that is below the selected item from TreeTableView or TreeView controls the selection and/or focus was wrongly changed in some occasions, because a shift in the selection was applied.
This PR adds a method to ControlUtils to get the index of the sibling that is selected/focused or contains the descendant item with the current selection/focus.
This index is required to compare properly if the selected/focus item is above or below the item that was removed, by comparing the indices of siblings.
Tests have been added to TreeViewTest and TreeTableViewTest based on the existing tests on JDK-8193442 and JDK-8187596. The four tests fail without this PR, pass with it.
In the process, I noticed that the ignored tests referred from JDK-8088157 were already passing, after removing some obsolete asserts, even without this PR.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/753/head:pull/753
$ git checkout pull/753
Update a local copy of the PR:
$ git checkout pull/753
$ git pull https://git.openjdk.java.net/jfx pull/753/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 753
View PR using the GUI difftool:
$ git pr show -t 753
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/753.diff