Skip to content

Commit e68b96f

Browse files
authored
Fix #4934: 返回页面时可能卡进空白页面 (#5305)
1 parent 7f63799 commit e68b96f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

HMCL/src/main/java/org/jackhuang/hmcl/ui/animation/TransitionPane.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public void setContent(Node newView, AnimationProducer transition,
8282
duration, interpolator);
8383
newAnimation.setOnFinished(e -> {
8484
setMouseTransparent(false);
85-
getChildren().remove(previousNode);
85+
if (previousNode != currentNode) {
86+
getChildren().remove(previousNode);
87+
}
8688

8789
if (cacheHint != null) {
8890
newView.setCache(false);

0 commit comments

Comments
 (0)