On Wed, 27 Oct 2021 09:56:46 GMT, Jeanette Winzenburg <faste...@openjdk.org> 
wrote:

>> Cleanup of Tree-/TableRowSkin to support switching skins
>> 
>> The misbehavior/s
>> - memory leaks due to manually registered listeners that were not removed
>> - side-effects due to listeners still active on old skin (like NPEs)
>> 
>> Fix
>> - use skin api for all listener registration (for automatic removal in 
>> dispose)
>> - do not install listeners that are not needed (fixedCellSize, same as in 
>> fix of ListCellSkin 
>> [JDK-8246745](https://bugs.openjdk.java.net/browse/JDK-8246745))
>> 
>> Added tests for each listener involved in the fix to guarantee it's still 
>> working and does not have unwanted side-effects after switching skins.
>> 
>> Note: there are pecularities in row skins (like not updating themselves on 
>> property changes of its control, throwing NPEs when not added to a 
>> VirtualFlow) which are not part of this issue but covered in 
>> [JDK-8274065](https://bugs.openjdk.java.net/browse/JDK-8274065)
>
> Jeanette Winzenburg has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   re-added forgotten code comments

modules/javafx.controls/src/main/java/javafx/scene/control/skin/TreeTableRowSkin.java
 line 365:

> 363:                 // Fix for RT-27782: Need to set isDirty to true, rather 
> than the
> 364:                 // cheaper updateCells, as otherwise the text 
> indentation will not
> 365:                 // be recalculated in 
> TreeTableCellSkin.leftLabelPadding()

Actually this comment is not correct anymore since my PR got merged 
(https://github.com/openjdk/jfx/pull/568).
Instead, it should be `TreeTableCellSkin.calculateIndentation()`.

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

PR: https://git.openjdk.java.net/jfx/pull/632

Reply via email to