FIX: get_similar_printer_preset only visit system preset

Change-Id: Ib219e76cba37ace7b81f69e63f4edd1edb25ddc4
Jira: STUDIO-10338
This commit is contained in:
chunmao.guo 2025-02-13 15:20:42 +08:00 committed by lane.wei
parent 5ad7576ce7
commit 0b4795fd10
1 changed files with 4 additions and 1 deletions

View File

@ -2255,7 +2255,10 @@ Preset *PresetBundle::get_similar_printer_preset(std::string printer_model, std:
auto printer_variant_old = printers.get_selected_preset().config.opt_string("printer_variant"); auto printer_variant_old = printers.get_selected_preset().config.opt_string("printer_variant");
std::set<std::string> printer_names; std::set<std::string> printer_names;
for (auto &preset : printers.m_presets) { for (auto &preset : printers.m_presets) {
if (preset.config.opt_string("printer_model") == printer_model) printer_names.insert(preset.name); if (printer_variant.empty() && !preset.is_system)
continue;
if (preset.config.opt_string("printer_model") == printer_model)
printer_names.insert(preset.name);
} }
if (printer_names.empty()) if (printer_names.empty())
return nullptr; return nullptr;