On Fri, 10 Jan 2025 15:19:48 GMT, henrykdz <d...@openjdk.org> wrote: >> Marius Hanl has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains four commits: >> >> - Merge branch 'master' of https://github.com/openjdk/jfx into >> 8185887-virtualization >> >> # Conflicts: >> # >> modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/VirtualFlowTest.java >> - Merge branch 'master' of https://github.com/openjdk/jfx into >> 8185887-virtualization >> >> # Conflicts: >> # >> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableRowSkinBase.java >> # >> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TreeTableRowSkin.java >> # >> modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java >> - 8185887: Reset disclosureNodeDirty in updateDisclosureNodeAndGraphic() >> - 8185887: TableRowSkinBase fails to correctly virtualize cells in >> horizontal direction > > Hey Guys, i am just new here, pls anyone help with my observation: > Bug Report: JavaFX TreeView - Incorrect Cell Index Update on Expand/Collapse > Issue: > When expanding or collapsing a TreeItem in a TreeView, an incorrect cell > index is updated. Specifically, a cell index mirrored vertically around the > center of the visible area is updated instead of the correct cell. This > indicates a flaw in the cell index update logic or the visible cell list > update mechanism. > > This issue is particularly noticeable when cells are styled using CSS, as the > incorrect update results in a visual glitch or flicker. Even without CSS, the > problem manifests as a subtle graphical irregularity due to the rapid update > process. > > Steps to Reproduce: > > Create a TreeView with enough items to enable scrolling. > Scroll to make a specific range of indices visible (e.g., indices 4 to 13). > Apply distinct CSS styles to cells to make updates visually apparent. > Expand or collapse a TreeItem within the visible range (e.g., index 5). > Observe that the mirrored index (e.g., index 12) is updated instead of the > correct index. > Observed Behavior: > When a TreeItem at index i is expanded/collapsed, the index updated is: > > Mirrored Index = 2 ⋅ Center − 𝑖 > > Examples: > Expanding/collapsing index 5 incorrectly updates index 12. > Expanding/collapsing index 10 incorrectly updates index 3. > Expected Behavior: > Only the cell corresponding to the expanded/collapsed TreeItem should be > updated. > > Impact: > Visual inconsistencies and graphical glitches in the TreeView. > Subtle flickering or graphical irregularities during expand/collapse actions, > especially noticeable with styled cells. > Suggested Cause: > A miscalculation or incorrect implementation in the logic for updating cell > indices or the visible cell list during expand/collapse operations. > > Environment: > Observed in JavaFX versions 16 through 23. > Present across different platforms and configurations.
@henrykdz : thank you for the bug report! I can help you to file a bug. Two questions: 1. is the issue you describe still present when tested with the changes in this PR? Or is it a separate issue? 2. can you create a simple SCCE (self-contained short example), see for instance https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/bugs/TreeView_RenderingFailure_8346824_8347357.java ------------- PR Comment: https://git.openjdk.org/jfx/pull/1644#issuecomment-2582991131