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).

Marked as reviewed by angorya (Committer).

Looks good!
Tested with the MonkeyTester using scenarios described in 
[JDK-8297167](https://bugs.openjdk.org/browse/JDK-8297167).

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

PR: https://git.openjdk.org/jfx/pull/1008Marked as reviewed by angorya 
(Committer).

Reply via email to