RFR: 8276553: ListView scrollTo() is broken after fix for JDK-8089589
Kevin Rushforth
kcr at openjdk.java.net
Mon Nov 29 17:02:13 UTC 2021
On Mon, 29 Nov 2021 16:55:16 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java line 903:
>>
>>> 901: recalculateAndImproveEstimatedSize(2);
>>> 902:
>>> 903: cellCount.set(value);
>>
>> Can this be implemented in a way that doesn't violate the property contract? Since this property is public API, `setCellCount(int)` should just call `cellCountProperty().set(int)`. Maybe you can extract the composite operation here into a private method and use that instead of `setCellCount(int)`.
>>
>> `position` has the same problem.
>
> good catch! the "additional" stuff typically is done in the properties' invalidated ..
Exactly. This ensures consistent behavior regardless of how a property value is set.
-------------
PR: https://git.openjdk.java.net/jfx/pull/683
More information about the openjfx-dev
mailing list