8359020: TabObservableList.reorder changes content of filtered list#2164
Conversation
|
👋 Welcome back mhanl! A progress list of the required criteria for merging this PR into |
|
@Maran23 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 11 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
andy-goryachev-oracle
left a comment
There was a problem hiding this comment.
I feel the code might have been simpler, but it does fix the issue, which is ok with me. The new test fails in master and passes with the fix. Also tested with the updated monkey tester
https://github.com/andy-goryachev-oracle/MonkeyTest
(stdout shows the original tab list + filtered one)
|
@Ziad-Mid could you be the second reviewer please? |
|
/integrate |
|
Going to push as commit d1bb3e3.
Your commit was automatically rebased without conflicts. |
Fixes that the
TabObservableListcreates wrongpermutationchange events. As they are wrong, listeners that rely on the change events likeFilteredListwill get confused and do the wrong things.I was wondering why the
TabPaneSkinwas not affected, as it installs a listener on the tabs.Turns out this is because the code path is not triggered when the tabs are reordered by dragging as can be seen here:
jfx/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java
Lines 606 to 609 in 697a534
So this issue is rather rare and limited to listeners installed by the developer (and interested in permutation events).
Or using a
FilteredListwith the tabs, which will install such a listener as well.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2164/head:pull/2164$ git checkout pull/2164Update a local copy of the PR:
$ git checkout pull/2164$ git pull https://git.openjdk.org/jfx.git pull/2164/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2164View PR using the GUI difftool:
$ git pr show -t 2164Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2164.diff
Using Webrev
Link to Webrev Comment