Fix #3006: 全局游戏设置中版本隔离开启后的显示的路径的版本号为”null“ (#3028)

This commit is contained in:
Burning_TNT 2024-05-31 23:10:02 +08:00 committed by GitHub
parent 312a2e0cde
commit 1275e38995
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,7 +30,9 @@ import javafx.scene.control.ScrollPane;
import javafx.scene.layout.*;
import javafx.scene.text.Text;
import javafx.stage.FileChooser;
import org.jackhuang.hmcl.game.*;
import org.jackhuang.hmcl.game.GameDirectoryType;
import org.jackhuang.hmcl.game.HMCLGameRepository;
import org.jackhuang.hmcl.game.ProcessPriority;
import org.jackhuang.hmcl.setting.*;
import org.jackhuang.hmcl.task.Schedulers;
import org.jackhuang.hmcl.task.Task;
@ -184,7 +186,7 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
gameDirSublist = new ComponentSublist();
gameDirSublist.getContent().add(gameDirItem);
gameDirSublist.setTitle(i18n("settings.game.working_directory"));
gameDirSublist.setHasSubtitle(true);
gameDirSublist.setHasSubtitle(versionId != null);
gameDirItem.disableProperty().bind(modpack);
gameDirCustomOption = new MultiFileItem.FileOption<>(i18n("settings.custom"), GameDirectoryType.CUSTOM)
.setChooserTitle(i18n("settings.game.working_directory.choose"))