From c7637079d78a9ce82018bf122071e3eeedf5c37b Mon Sep 17 00:00:00 2001 From: Wulian233 <1055917385@qq.com> Date: Sat, 12 Sep 2026 20:16:18 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20#6851:=20=E4=BF=AE=E5=A4=8D=E5=8F=B3?= =?UTF-8?q?=E9=94=AE=E9=83=A8=E5=88=86=E9=80=89=E9=A1=B9=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E5=BC=B9=E7=AA=97=E4=BC=9A=E6=97=A0=E9=99=90=E5=8F=A0?= =?UTF-8?q?=E5=8A=A0=20(#6854)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close #6851 --- .../jackhuang/hmcl/ui/instances/GameListPopupMenu.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/GameListPopupMenu.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/GameListPopupMenu.java index 71c845ab3c..63d4cf36c9 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/GameListPopupMenu.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/instances/GameListPopupMenu.java @@ -73,7 +73,9 @@ public final class GameListPopupMenu extends StackPane { public static void show(Node owner, JFXPopup.PopupVPosition vAlign, JFXPopup.PopupHPosition hAlign, double initOffsetX, double initOffsetY, List instances) { - showAndGetPopup(owner, vAlign, hAlign, initOffsetX, initOffsetY, instances); + if (!hideShowing(owner)) { + showAndGetPopup(owner, vAlign, hAlign, initOffsetX, initOffsetY, instances); + } } /// Shows and returns an instance selection popup relative to its owner. @@ -117,9 +119,7 @@ public final class GameListPopupMenu extends StackPane { Label placeholder = new Label(i18n("instance.empty")); placeholder.setStyle("-fx-padding: 10px; -fx-text-fill: -monet-on-surface-variant; -fx-font-style: italic;"); - FXUtils.onChangeAndOperate(isEmpty, empty -> { - getChildren().setAll(empty ? placeholder : listView); - }); + FXUtils.onChangeAndOperate(isEmpty, empty -> getChildren().setAll(empty ? placeholder : listView)); } public ObservableList getItems() {