From f2ee0daef57cc81c945e831fea721177c9e535d3 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 a290532a2..68a817b0f 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -754,6 +754,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 15b1ef94e..c8d874dcb 100644 --- a/src/libslic3r/PresetBundle.cpp +++ b/src/libslic3r/PresetBundle.cpp @@ -2949,7 +2949,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;