mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: use prefer preset after reset project presets
Change-Id: Idadee17f28f345cccccf35ec2da2b0786799840d
This commit is contained in:
parent
95ab9e2951
commit
1c4d0e9bc1
1 changed files with 6 additions and 0 deletions
|
@ -421,6 +421,12 @@ void PresetBundle::reset_project_embedded_presets()
|
|||
Preset* selected_filament = this->filaments.find_preset(filament_presets[i], false);
|
||||
if (!selected_filament) {
|
||||
//it should be the project embedded presets
|
||||
Preset& current_printer = this->printers.get_selected_preset();
|
||||
const std::vector<std::string> &prefered_filament_profiles = current_printer.config.option<ConfigOptionStrings>("default_filament_profile")->values;
|
||||
const std::string prefered_filament_profile = prefered_filament_profiles.empty() ? std::string() : prefered_filament_profiles.front();
|
||||
if (!prefered_filament_profile.empty())
|
||||
filament_presets[i] = prefered_filament_profile;
|
||||
else
|
||||
filament_presets[i] = this->filaments.first_visible().name;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue