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
3 changed files with 18 additions and 4 deletions

View File

@@ -522,7 +522,7 @@ public:
// a new preset is stored into the list of presets.
// All presets are marked as not modified and the new preset is activated.
//BBS: add project embedded preset logic
void save_current_preset(const std::string &new_name, bool detach = false, bool save_to_project = false, Preset* _curr_preset = nullptr);
void save_current_preset(const std::string &new_name, bool detach = false, bool save_to_project = false, Preset* _curr_preset = nullptr, const Preset* _current_printer = nullptr);
// Delete the current preset, activate the first visible preset.
// returns true if the preset was deleted successfully.
@@ -566,6 +566,8 @@ public:
Preset& get_edited_preset() { return m_edited_preset; }
const Preset& get_edited_preset() const { return m_edited_preset; }
const Preset& get_selected_preset_base() const { return *get_preset_base(m_presets[m_idx_selected]); }
// Return the last saved preset.
// const Preset& get_saved_preset() const { return m_saved_preset; }