On Tue, 30 Jul 2024 07:01:58 GMT, Marius Hanl <mh...@openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java >> line 808: >> >>> 806: vertical = new BooleanPropertyBase(true) { >>> 807: @Override protected void invalidated() { >>> 808: resetIndex(cells); >> >> minor: [cells|pile]clear() can be combined with resetIndex(), something like >> >> >> private void clear(ArrayLinkedList<T> cells) { >> for (T cell : cells) { >> cell.updateIndex(-1); >> } >> cells.clear(); >> } >> >> >> as these operations seem to be called in pairs > > Unfortunately not in the `needsRebuildCells` if condition, where we only > reset the index and add all cells to the pile you are right. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1521#discussion_r1697116747