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
@ -876,6 +876,17 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool
|
||||
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).
|
||||
this->project_config.apply_only(config, s_project_options);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user