[Rev 01] RFR: 8237602: TabPane doesn't respect order of TabPane.getTabs() list

Ambarish Rapte arapte at openjdk.java.net
Mon May 11 04:12:22 UTC 2020


> Issue:
> When tabs are permuted as mentioned in the issue description as,
> 1. TabPane.getTabs().setAll(tab0, tab1)
> 2. TabPane.getTabs().setAll(tab0, tab1, tab2, tab3);
> the tab headers do not get permuted in same order as `TabPane.getTabs()`.
> 
> => tab headers should be shown in order as  tab0, tab1, tab2, tab3.
> => but are show in order as  tab2, tab3, tab0, tab1
> 
> Cause:
> Newly added tabs(tab2, tab3) are not inserted at correct index. The index `Change.getFrom()` (0) used from Change does
> not remain valid after the tabs to be moved(tab0, tab1) are removed from `tabsToAdd` list.
> Fix:
> Use the index of first newly added tab, from `TabPane.getTabs()`, which would be always reliable.
> 
> Verification:
> No existing tests fail due to this change.
> Added a system test which fails without and pass with fix.

Ambarish Rapte has updated the pull request incrementally with one additional commit since the last revision:

  review-update: change test name

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

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/201/files
  - new: https://git.openjdk.java.net/jfx/pull/201/files/68e8efd2..548badaa

Webrevs:
 - full: https://webrevs.openjdk.java.net/jfx/201/webrev.01
 - incr: https://webrevs.openjdk.java.net/jfx/201/webrev.00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/201.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/201/head:pull/201

PR: https://git.openjdk.java.net/jfx/pull/201


More information about the openjfx-dev mailing list