RFR: 8320232: Cells duplicated when table collapsed and expanded

Andy Goryachev angorya at openjdk.org
Tue Jul 30 14:58:46 UTC 2024


On Tue, 30 Jul 2024 07:01:58 GMT, Marius Hanl <mhanl at 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


More information about the openjfx-dev mailing list