mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-16 15:26:27 -04:00
Copy global settings when specialize version setting
This commit is contained in:
parent
5fd52bb808
commit
d5408c38b3
@ -38,6 +38,7 @@ import org.jackhuang.hmcl.util.Lang;
|
|||||||
import org.jackhuang.hmcl.util.StringUtils;
|
import org.jackhuang.hmcl.util.StringUtils;
|
||||||
import org.jackhuang.hmcl.util.gson.JsonUtils;
|
import org.jackhuang.hmcl.util.gson.JsonUtils;
|
||||||
import org.jackhuang.hmcl.util.io.FileUtils;
|
import org.jackhuang.hmcl.util.io.FileUtils;
|
||||||
|
import org.jackhuang.hmcl.util.javafx.PropertyUtils;
|
||||||
import org.jackhuang.hmcl.java.JavaRuntime;
|
import org.jackhuang.hmcl.java.JavaRuntime;
|
||||||
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
||||||
import org.jackhuang.hmcl.util.versioning.VersionNumber;
|
import org.jackhuang.hmcl.util.versioning.VersionNumber;
|
||||||
@ -357,7 +358,10 @@ public class HMCLGameRepository extends DefaultGameRepository {
|
|||||||
vs = createLocalVersionSetting(id);
|
vs = createLocalVersionSetting(id);
|
||||||
if (vs == null)
|
if (vs == null)
|
||||||
return null;
|
return null;
|
||||||
|
VersionIconType versionIcon = vs.getVersionIcon();
|
||||||
|
PropertyUtils.copyProperties(profile.getGlobal(), vs);
|
||||||
vs.setUsesGlobal(false);
|
vs.setUsesGlobal(false);
|
||||||
|
vs.setVersionIcon(versionIcon); // versionIcon is preserved
|
||||||
return vs;
|
return vs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user