On Sun, 3 May 2026 20:21:11 GMT, Marius Hanl <[email protected]> wrote:

> Fixes that the `TabObservableList` creates wrong `permutation` change events. 
> As they are wrong, listeners that rely on the change events like 
> `FilteredList` will get confused and do the wrong things.
> 
> I was wondering why the `TabPaneSkin` was 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:
> 
> https://github.com/openjdk/jfx/blob/697a534bf494d82bf8e0ecacfebaba003dcc6c7a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java#L606-L609
> 
> So this issue is rather rare and limited to listeners installed by the 
> developer (and interested in permutation events).
> Or using a `FilteredList` with the tabs, which will install such a listener 
> as well.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: d1bb3e3b
Author:    Marius Hanl <[email protected]>
URL:       
https://git.openjdk.org/jfx/commit/d1bb3e3b0e41bb5e2328264790852e60455eb2d4
Stats:     56 lines in 2 files changed: 51 ins; 0 del; 5 mod

8359020: TabObservableList.reorder changes content of filtered list

Reviewed-by: angorya, mstrauss

-------------

PR: https://git.openjdk.org/jfx/pull/2164

Reply via email to