PhysicalPrinterCollection: Use select_preset() instead of select_preset_by_name()

+ changed signature for select_preset()
This commit is contained in:
YuSanka 2020-07-23 12:17:18 +02:00
parent 299b783601
commit a4c12b90f1
5 changed files with 23 additions and 30 deletions

View file

@ -366,7 +366,7 @@ bool PresetComboBox::selection_is_changed_according_to_physical_printers()
else
old_printer_preset = m_collection->get_edited_preset().name;
// Select related printer preset on the Printer Settings Tab
physical_printers.select_printer_by_name(selected_string);
physical_printers.select_printer(selected_string);
std::string preset_name = physical_printers.get_selected_printer_preset_name();
// if new preset wasn't selected, there is no need to call update preset selection
@ -1031,7 +1031,7 @@ void TabPresetComboBox::update_physical_printers( const std::string& preset_name
dialog.ShowModal();
}
physical_printers.select_printer_by_name(printer.get_full_name(preset_name));
physical_printers.select_printer(printer.get_full_name(preset_name));
}
}
else

View file

@ -3100,7 +3100,7 @@ void Tab::select_preset(std::string preset_name, bool delete_current /*=false*/,
if (!last_selected_ph_printer_name.empty() &&
m_presets->get_edited_preset().name == PhysicalPrinter::get_preset_name(last_selected_ph_printer_name)) {
// If preset selection was canceled and previously was selected physical printer, we should select it back
m_preset_bundle->physical_printers.select_printer_by_name(last_selected_ph_printer_name);
m_preset_bundle->physical_printers.select_printer(last_selected_ph_printer_name);
}
}