On Sat, 3 Apr 2021 15:35:19 GMT, Florian Kirmaier <[email protected]> wrote:
> Fixing leak in ProgressIndicator when treeShowing is false
I haven't run it yet, but noticed a couple things during a quick code review.
modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java
line 746:
> 744:
> ((Timeline)indeterminateTransition).getKeyFrames().setAll(keyFrames);
> 745:
> 746: if(NodeHelper.isTreeShowing(control)) {
Minor: space after `if`.
modules/javafx.controls/src/main/java/javafx/scene/control/skin/ProgressIndicatorSkin.java
line 748:
> 746: if(NodeHelper.isTreeShowing(control)) {
> 747: indeterminateTransition.playFromStart();
> 748: }
In the case where `isTreeShowing` is false, and later goes to true, there will
be a slight change in behavior, since `updateAnimation` will call `play` in
that case. To make sure that the behavior is the same, I recommend calling
`indeterminateTransition.jumpTo(Duration.ZERO);` in an `else` block here.
-------------
PR: https://git.openjdk.java.net/jfx/pull/455