RFR: 8277785: ListView scrollTo jumps to wrong location when CellHeight is changed

Florian Kirmaier fkirmaier at openjdk.java.net
Mon Jan 10 09:02:31 UTC 2022


On Sun, 9 Jan 2022 15:20:36 GMT, Johan Vos <jvos at openjdk.org> wrote:

> When the size of a ListCell is changed and a scrollTo method is invoked without having a layout calculation in between, the old (wrong) size is used to calculcate the total estimate. This happens e.g. when the size is changed in the `updateItem` method.
> This PR will immediately resize the cell and sets the new value in the cache containing the cellsizes.

I've just tested it with the TestProgram of the ticket, and it is now less wrong, but still not correct.
There is a small empty are, of the size of about 5 pixels.
<img width="346" alt="Screenshot 2022-01-10 at 09 56 31" src="https://user-images.githubusercontent.com/6547435/148739867-dd16ba38-0378-42ce-b6f6-9700e699471d.png">

This happens with the 1, 2, and 3rd button, but not with the 4th button. The order of the clicks doesn't seem to matter.

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

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


More information about the openjfx-dev mailing list