On Wed, 14 Dec 2022 18:06:28 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> When recalculating sizes, we often don't want the current index and/or 
>> offset to change.
>> 
>> Allow to fix the index/offset when doing recalculations.
>> 
>> Fix JDK-8298728
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java
>  line 2327:
> 
>> 2325:         double cellLength = getOrCreateCellSize(index);
>> 2326:         if (index > 0) getOrCreateCellSize(index - 1);
>> 2327:         if (index < getCellCount() -1) getOrCreateCellSize(index + 1);
> 
> I think it's better to keep one statement per line - for stepping through in 
> a debugger, and also if an exception gets thrown it will be easier to see 
> where.

True -- I'll change that.

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

PR: https://git.openjdk.org/jfx/pull/974

Reply via email to