Fix IllegalStateException in DownloadWizardProvider

This commit is contained in:
huangyuhui 2018-07-04 21:41:07 +08:00
parent 0dd2e758e8
commit 3fb5048f10
2 changed files with 9 additions and 1 deletions

View File

@ -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();
}

View File

@ -8,6 +8,7 @@ HMCL is a Minecraft launcher which supports Mod management, game customizing, au
## Downloads
Binary version can be found here: https://ci.huangyuhui.net/job/HMCL
Archives in GitHub releases are built by closed CIs, uploaded here for backup.
## Contribution