Fix of #5450 - Wrong printer preset after loading 3mf project file when having multiple presets for one physical printer

This commit is contained in:
YuSanka 2020-12-15 12:09:03 +01:00
parent 82fe571cdc
commit 43581059ff
3 changed files with 10 additions and 2 deletions

View file

@ -1849,6 +1849,13 @@ void PhysicalPrinterCollection::select_printer(const std::string& full_name)
m_selected_preset = it->get_preset_name(full_name);
}
void PhysicalPrinterCollection::select_printer(const std::string& printer_name, const std::string& preset_name)
{
if (preset_name.empty())
return select_printer(printer_name);
return select_printer(printer_name + PhysicalPrinter::separator() + preset_name);
}
void PhysicalPrinterCollection::select_printer(const PhysicalPrinter& printer)
{
return select_printer(printer.name);