FIX: get_similar_printer_preset only visit system preset

Change-Id: Ib219e76cba37ace7b81f69e63f4edd1edb25ddc4
Jira: STUDIO-10338
(cherry picked from commit 0b4795fd10a9d8fd4fd2fe32d03cd7efec9236e9)
This commit is contained in:
chunmao.guo 2025-02-13 15:20:42 +08:00 committed by Noisyfox
parent e05d81c797
commit e56774ad71

View file

@ -2541,7 +2541,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");
std::set<std::string> printer_names;
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())
return nullptr;