mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: Record the preset compatibile_printer field for cloning
Jira: STUDIO-12167 Change-Id: Iaf66bf48f892d32c77103ee7c8dbf3ccaabc2e09 (cherry picked from commit f4abad029e01c597b91bc14c60e6bb9a30f2d477)
This commit is contained in:
@@ -2373,6 +2373,11 @@ bool PresetCollection::clone_presets_for_filament(Preset const *const & pres
|
||||
preset.config.apply_only(dynamic_config, {"filament_vendor", "compatible_printers", "filament_type"},true);
|
||||
|
||||
preset.filament_id = filament_id;
|
||||
auto compatible = dynamic_cast<ConfigOptionStrings *>(preset.config.option("compatible_printers"));
|
||||
if (compatible->values.empty()) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << " " << __LINE__ << preset.name << " apply compatible_printer failed";
|
||||
compatible->values.push_back(compatible_printers);
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " " << __LINE__ << preset.name << " is cloned and filament_id: " << filament_id;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user