mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-08 19:35:36 -04:00
Fix IllegalStateException in DownloadWizardProvider
This commit is contained in:
parent
0dd2e758e8
commit
3fb5048f10
@ -80,7 +80,10 @@ public final class TransitionHandler implements AnimationHandler {
|
||||
|
||||
Timeline nowAnimation = new Timeline();
|
||||
nowAnimation.getKeyFrames().addAll(transition.animate(this));
|
||||
nowAnimation.getKeyFrames().add(new KeyFrame(duration, e -> view.getChildren().remove(previousNode)));
|
||||
nowAnimation.getKeyFrames().add(new KeyFrame(duration, e -> {
|
||||
previousNode.setMouseTransparent((Boolean) previousNode.getProperties().get(MOUSE_TRANSPARENT));
|
||||
view.getChildren().remove(previousNode);
|
||||
}));
|
||||
nowAnimation.play();
|
||||
animation = nowAnimation;
|
||||
}
|
||||
@ -96,10 +99,14 @@ public final class TransitionHandler implements AnimationHandler {
|
||||
if (previousNode == newView)
|
||||
previousNode = NULL;
|
||||
|
||||
previousNode.getProperties().put(MOUSE_TRANSPARENT, previousNode.isMouseTransparent());
|
||||
previousNode.setMouseTransparent(true);
|
||||
|
||||
currentNode = newView;
|
||||
|
||||
view.getChildren().setAll(previousNode, currentNode);
|
||||
}
|
||||
|
||||
private static final String MOUSE_TRANSPARENT = "TransitionHandler.MOUSE_TRANSPARENT";
|
||||
private static final StackPane NULL = new StackPane();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user