On Mon, 5 Feb 2024 09:53:23 GMT, Marius Hanl <mh...@openjdk.org> wrote:

>> Florian Kirmaier has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   JDK-8323511
>>   reverted accidental indentation chang
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java
>  line 1556:
> 
>> 1554:         if (targetCell != null) {
>> 1555:             if (targetIndex < 0) {
>> 1556:                 T cell = getCell(targetIndex);
> 
> Is there a reason you call `getCell` here, but `getAvailableCell` below?

As I was also involved in fixing this error, I can answer.

The `getAvailableCell()` method creates a new cell if none exists for the 
specified index (-1). 
The `getCell()` returns the `accumCell` in this case, which is completely 
sufficient for our case, because we only need the dimensions of the cell here. 
The cell itself will not be added to the scene-graph.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1326#discussion_r1519900760

Reply via email to