From e68b96f67d9088921fc2425536cf043cf01c7847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=9E=E5=BA=90?= <109708109+CiiLu@users.noreply.github.com> Date: Sat, 24 Jan 2026 21:41:04 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20#4934:=20=E8=BF=94=E5=9B=9E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=97=B6=E5=8F=AF=E8=83=BD=E5=8D=A1=E8=BF=9B=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E9=A1=B5=E9=9D=A2=20(#5305)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jackhuang/hmcl/ui/animation/TransitionPane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/animation/TransitionPane.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/animation/TransitionPane.java index 2cda33e6a..10dae217f 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/animation/TransitionPane.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/animation/TransitionPane.java @@ -82,7 +82,9 @@ public class TransitionPane extends StackPane { duration, interpolator); newAnimation.setOnFinished(e -> { setMouseTransparent(false); - getChildren().remove(previousNode); + if (previousNode != currentNode) { + getChildren().remove(previousNode); + } if (cacheHint != null) { newView.setCache(false);