Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Bubnik <bubnikv@gmail.com>2021-06-28 18:26:24 +0300
committerVojtech Bubnik <bubnikv@gmail.com>2021-06-28 18:26:59 +0300
commit226bf929fb9f1cb4cad1d2bb5468b3f01971d701 (patch)
treeaa701c80a8a4749c818b46aa0be82056a1e0d35f /src/slic3r/GUI/ConfigWizard.cpp
parent14dc4c8afccde4744f40867ff810d7b20071be64 (diff)
Fixed loading of system presets with incompatible system profile keys
before the "reconfigure" dialog is shown. Replaced boost::filesystem::copy_file() with Slic3r::copy_file() in config snapshot loading code.
Diffstat (limited to 'src/slic3r/GUI/ConfigWizard.cpp')
-rw-r--r--src/slic3r/GUI/ConfigWizard.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp
index 0f9ae76de..31d16d4a1 100644
--- a/src/slic3r/GUI/ConfigWizard.cpp
+++ b/src/slic3r/GUI/ConfigWizard.cpp
@@ -58,7 +58,9 @@ bool Bundle::load(fs::path source_path, bool ais_in_resources, bool ais_prusa_bu
this->is_prusa_bundle = ais_prusa_bundle;
std::string path_string = source_path.string();
- auto [config_substitutions, presets_loaded] = preset_bundle->load_configbundle(path_string, PresetBundle::LoadConfigBundleAttribute::LoadSystem);
+ // Throw when parsing invalid configuration. Only valid configuration is supposed to be provided over the air.
+ auto [config_substitutions, presets_loaded] = preset_bundle->load_configbundle(
+ path_string, PresetBundle::LoadConfigBundleAttribute::LoadSystem, ForwardCompatibilitySubstitutionRule::Disable);
// No substitutions shall be reported when loading a system config bundle, no substitutions are allowed.
assert(config_substitutions.empty());
auto first_vendor = preset_bundle->vendors.begin();
@@ -2463,7 +2465,8 @@ void ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
// Reloading the configs after some modifications were done to PrusaSlicer.ini.
// Just perform the substitutions silently, as the substitutions were already presented to the user on application start-up
// and the Wizard shall not create any new values that would require substitution.
- PresetsConfigSubstitutions substitutions = preset_bundle->load_presets(*app_config, ForwardCompatibilitySubstitutionRule::EnableSilent, preferred_model);
+ // Throw on substitutions in system profiles, as the system profiles provided over the air should be compatible with this PrusaSlicer version.
+ preset_bundle->load_presets(*app_config, ForwardCompatibilitySubstitutionRule::EnableSilentDisableSystem, preferred_model);
if (page_custom->custom_wanted()) {
page_firmware->apply_custom_config(*custom_config);