From 4118fa9729c7578a5ad9bb356f3459ec03a41e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=9E=E5=BA=90?= <109708109+CiiLu@users.noreply.github.com> Date: Wed, 30 Sep 2026 20:31:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=9E=E4=BE=8B=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E5=90=8E=E8=87=AA=E5=8A=A8=E9=80=89=E4=B8=AD?= =?UTF-8?q?=20(#6912)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jackhuang/hmcl/ui/directory/GameDirectoryPage.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/directory/GameDirectoryPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/directory/GameDirectoryPage.java index 8564577c2f..962bc0b6ae 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/directory/GameDirectoryPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/directory/GameDirectoryPage.java @@ -41,11 +41,7 @@ import org.jackhuang.hmcl.setting.GameDirectoryManager; import org.jackhuang.hmcl.setting.SettingsManager; import org.jackhuang.hmcl.ui.Controllers; import org.jackhuang.hmcl.ui.FXUtils; -import org.jackhuang.hmcl.ui.construct.ComponentList; -import org.jackhuang.hmcl.ui.construct.LineFileChooserButton; -import org.jackhuang.hmcl.ui.construct.LineToggleButton; -import org.jackhuang.hmcl.ui.construct.MessageDialogPane; -import org.jackhuang.hmcl.ui.construct.PageCloseEvent; +import org.jackhuang.hmcl.ui.construct.*; import org.jackhuang.hmcl.ui.decorator.DecoratorPage; import org.jackhuang.hmcl.util.FXThread; import org.jackhuang.hmcl.util.PortablePath; @@ -248,21 +244,25 @@ public final class GameDirectoryPage extends BorderPane implements DecoratorPage Controllers.confirmBackupAndOverwrite(i18n("settings.game_directories.read_only"), () -> { SettingsManager.forceOverwriteUserGameDirectories(); GameDirectoryManager.addUserGameDirectory(newGameDirectory); + GameDirectoryManager.setSelectedGameDirectory(newGameDirectory); fireEvent(new PageCloseEvent()); }); return; } GameDirectoryManager.addUserGameDirectory(newGameDirectory); + GameDirectoryManager.setSelectedGameDirectory(newGameDirectory); } else { if (SettingsManager.isLocalGameDirectoriesReadOnly()) { Controllers.confirmBackupAndOverwrite(i18n("settings.game_directories.read_only"), () -> { SettingsManager.forceOverwriteLocalGameDirectories(); GameDirectoryManager.addLocalGameDirectory(newGameDirectory); + GameDirectoryManager.setSelectedGameDirectory(newGameDirectory); fireEvent(new PageCloseEvent()); }); return; } GameDirectoryManager.addLocalGameDirectory(newGameDirectory); + GameDirectoryManager.setSelectedGameDirectory(newGameDirectory); } }