RFR: 8284665: First selected item of a TreeItem multiple selection gets removed if new items are constantly added to the TreeTableView

Jose Pereda jpereda at openjdk.java.net
Thu May 5 16:27:54 UTC 2022


This PR fixes an issue with selection of multiple items in TableView and TreeTableView controls that gets moved unexpectedly when new items are added even way below the selected items.

A couple of tests have been added.  They fail without this PR (first selected item gets deselected, and table anchor gets moved), and pass with this PR (first selected item keeps selected, and table anchor remains at the same place).

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

Commit messages:
 - Only shift anchor if existing one is affected by the change event, and tests

Changes: https://git.openjdk.java.net/jfx/pull/790/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=790&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8284665
  Stats: 100 lines in 4 files changed: 98 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jfx/pull/790.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/790/head:pull/790

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


More information about the openjfx-dev mailing list