Fixed loading of the project file with filament which is not installed for the selected printers
If loaded filaments are invisible/non-instaled, set them as visible
This commit is contained in:
parent
70fc0c232c
commit
409849d238
1 changed files with 11 additions and 0 deletions
|
@ -876,6 +876,17 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool
|
||||||
this->filament_presets[i] = loaded->name;
|
this->filament_presets[i] = loaded->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 3.1) If loaded filaments are invisible/non-instaled, set them as visible
|
||||||
|
for (const std::string& filament : this->filament_presets) {
|
||||||
|
Preset* preset = this->filaments.find_preset(filament);
|
||||||
|
if (preset && !preset->is_visible) {
|
||||||
|
preset->is_visible = true;
|
||||||
|
if (preset->name == this->filaments.m_edited_preset.name)
|
||||||
|
this->filaments.get_selected_preset().is_visible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 4) Load the project config values (the per extruder wipe matrix etc).
|
// 4) Load the project config values (the per extruder wipe matrix etc).
|
||||||
this->project_config.apply_only(config, s_project_options);
|
this->project_config.apply_only(config, s_project_options);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue