mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 06:17:47 -04:00
parent
5374127241
commit
82e0cd1ca1
@ -30,8 +30,7 @@ public class TransitionPane extends StackPane implements AnimationHandler {
|
|||||||
private Duration duration;
|
private Duration duration;
|
||||||
private Node previousNode, currentNode;
|
private Node previousNode, currentNode;
|
||||||
|
|
||||||
{
|
public TransitionPane() {
|
||||||
currentNode = getChildren().stream().findFirst().orElse(null);
|
|
||||||
FXUtils.setOverflowHidden(this);
|
FXUtils.setOverflowHidden(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,8 +90,12 @@ public class TransitionPane extends StackPane implements AnimationHandler {
|
|||||||
private void updateContent(Node newView) {
|
private void updateContent(Node newView) {
|
||||||
if (getWidth() > 0 && getHeight() > 0) {
|
if (getWidth() > 0 && getHeight() > 0) {
|
||||||
previousNode = currentNode;
|
previousNode = currentNode;
|
||||||
if (previousNode == null)
|
if (previousNode == null) {
|
||||||
previousNode = EMPTY_PANE;
|
if (getChildren().isEmpty())
|
||||||
|
previousNode = EMPTY_PANE;
|
||||||
|
else
|
||||||
|
previousNode = getChildren().get(0);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
previousNode = EMPTY_PANE;
|
previousNode = EMPTY_PANE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user