Skip to content

Commit b8df46e

Browse files
GlavoCiiLu
andauthored
[release/3.10] 修复返回页面时可能卡进空白页面的问题 (#5355)
#5305 Co-authored-by: 辞庐 <109708109+CiiLu@users.noreply.github.com>
1 parent 0c04a01 commit b8df46e

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)