From 3b9d61cfc0d09f7e5fb519b05283996c388ab5c8 Mon Sep 17 00:00:00 2001 From: "lane.wei" Date: Sat, 23 Sep 2023 15:20:56 +0800 Subject: [PATCH] ENH: config: add local logic into config.load JIRA: github-2569 Change-Id: If593b9faee324dda096a27873587db27aa22129e --- src/libslic3r/Config.cpp | 3 +++ src/libslic3r/PresetBundle.cpp | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index 69630c16ac..b86ae459bd 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -753,6 +753,9 @@ int ConfigBase::load_from_json(const std::string &file, ConfigSubstitutionContex std::list different_settings_append; std::string new_support_style; bool is_project_settings = false; + + CNumericLocalesSetter locales_setter; + try { boost::nowide::ifstream ifs(file); ifs >> j; diff --git a/src/libslic3r/PresetBundle.cpp b/src/libslic3r/PresetBundle.cpp index f048c77cab..57bff3b265 100644 --- a/src/libslic3r/PresetBundle.cpp +++ b/src/libslic3r/PresetBundle.cpp @@ -2729,7 +2729,6 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool std::pair PresetBundle::load_vendor_configs_from_json( const std::string &path, const std::string &vendor_name, LoadConfigBundleAttributes flags, ForwardCompatibilitySubstitutionRule compatibility_rule) { - CNumericLocalesSetter locales_setter; // Enable substitutions for user config bundle, throw an exception when loading a system profile. ConfigSubstitutionContext substitution_context { compatibility_rule }; PresetsConfigSubstitutions substitutions;