On Mon, 23 Jan 2023 20:40:23 GMT, Jose Pereda <jper...@openjdk.org> wrote:
> Given a TableView with multiple and cell selection modes enabled, three > different but closely related issues are tackled with this PR: > > - Selection history, that is used to backtrack deselection of cells, removes > deselected cells, so the "second to last" cell is always up to date for > second and further deselection > > - Selection history is also used for horizontal backtracking: deselection can > go from right to left or left to right (in which case the second to last cell > from the selected cells list is not correct, since these are always sorted > from left to right, and top to bottom) > - Selection history, can be reset after the selection gets replaced with a > new one (meaning that there is a new anchor) > > Tests have been added for this three issues (in same order), for both > TableView and TreeTableView > - testSelectionPathDeviationWorks1 was already there, but ignored, and with a > small bug. Tests vertical backtrack > - testSelectionPathDeviationWorks2 tests horizontal backtrack > - testSelectionPathDeviationWorks3 tests vertical backtrack, change of > anchor, and tests vertical backtrack again > > The three (six) of them fail without the proposed fix, pass with it. > > Minor: the selection history now has a bigger size (there is no real reason > to limit it to 10 cells). This pull request has now been integrated. Changeset: dbab36b2 Author: Jose Pereda <jper...@openjdk.org> URL: https://git.openjdk.org/jfx/commit/dbab36b2a264cd596d0390e42e15d4b2bc0c33b8 Stats: 274 lines in 4 files changed: 247 ins; 5 del; 22 mod 8300893: Wrong state after deselecting two or more cells of a TableView selection Reviewed-by: aghaisas, angorya ------------- PR: https://git.openjdk.org/jfx/pull/1008