ENH: config: remove unused custome_defined logic
also improve project_embedded 1. remove unused is_custom_defined 2. improve project_embedded to support multi-extruder diff jira: no-jira Change-Id: I1db28c3cfd59ccc31c6855af30305396c71c4e9a (cherry picked from commit 0434853bf32b063f7850fd4e0c9c3a6045375225)
This commit is contained in:
@@ -2499,7 +2499,7 @@ ConfigSubstitutions PresetBundle::load_config_file(const std::string &path, Forw
|
||||
|
||||
// Load a config file from a boost property_tree. This is a private method called from load_config_file.
|
||||
// is_external == false on if called from ConfigWizard
|
||||
void PresetBundle::load_config_file_config(const std::string &name_or_path, bool is_external, DynamicPrintConfig &&config, Semver file_version, bool selected, bool is_custom_defined)
|
||||
void PresetBundle::load_config_file_config(const std::string &name_or_path, bool is_external, DynamicPrintConfig &&config, Semver file_version, bool selected)
|
||||
{
|
||||
PrinterTechnology printer_technology = Preset::printer_technology(config);
|
||||
|
||||
@@ -2604,7 +2604,7 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool
|
||||
[&config, &inherits, &inherits_values,
|
||||
&compatible_printers_condition, &compatible_printers_condition_values,
|
||||
&compatible_prints_condition, &compatible_prints_condition_values,
|
||||
is_external, &name, &name_or_path, file_version, selected, is_custom_defined]
|
||||
is_external, &name, &name_or_path, file_version, selected]
|
||||
(PresetCollection &presets, size_t idx, const std::string &key, const std::set<std::string> &different_keys, std::string filament_id) {
|
||||
// Split the "compatible_printers_condition" and "inherits" values one by one from a single vector to the print & printer profiles.
|
||||
inherits = inherits_values[idx];
|
||||
@@ -2616,7 +2616,7 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool
|
||||
if (is_external)
|
||||
presets.load_external_preset(name_or_path, name, config.opt_string(key, true), config, different_keys, PresetCollection::LoadAndSelect::Always, file_version, filament_id);
|
||||
else
|
||||
presets.load_preset(presets.path_from_name(name, inherits.empty()), name, config, selected, file_version, is_custom_defined).save(nullptr);
|
||||
presets.load_preset(presets.path_from_name(name, inherits.empty()), name, config, selected, file_version).save(nullptr);
|
||||
};
|
||||
|
||||
switch (Preset::printer_technology(config)) {
|
||||
@@ -2685,7 +2685,7 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool
|
||||
loaded = this->filaments.load_external_preset(name_or_path, name, old_filament_profile_names->values.front(), config, filament_different_keys_set, PresetCollection::LoadAndSelect::Always, file_version, filament_id).first;
|
||||
else {
|
||||
// called from Config Wizard.
|
||||
loaded= &this->filaments.load_preset(this->filaments.path_from_name(name, inherits.empty()), name, config, true, file_version, is_custom_defined);
|
||||
loaded= &this->filaments.load_preset(this->filaments.path_from_name(name, inherits.empty()), name, config, true, file_version);
|
||||
loaded->save(nullptr);
|
||||
}
|
||||
this->filament_presets.clear();
|
||||
|
||||
Reference in New Issue
Block a user