Limit visibility of custom filament profiles based on OrcaFilamentLibrary to currently selected printer only (#8779)

Set compatible_printers when creating custom filament profiles so that this custom profile won't be visible automatically for all printers.
This commit is contained in:
SoftFever 2025-03-09 21:51:19 +08:00 committed by GitHub
parent c150bbf61c
commit 312ddaa8fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 4 deletions

View file

@ -5561,8 +5561,12 @@ void Tab::save_preset(std::string name /*= ""*/, bool detach, bool save_to_proje
exist_preset = true;
}
// Save the preset into Slic3r::data_dir / presets / section_name / preset_name.ini
m_presets->save_current_preset(name, detach, save_to_project);
Preset* _current_printer = nullptr;
if (m_presets->type() == Preset::TYPE_FILAMENT) {
_current_printer = const_cast<Preset*>(&wxGetApp().preset_bundle->printers.get_selected_preset_base());
}
// Save the preset into Slic3r::data_dir / presets / section_name / preset_name.json
m_presets->save_current_preset(name, detach, save_to_project, nullptr, _current_printer);
//BBS create new settings
new_preset = m_presets->find_preset(name, false, true);