FIX:If the current preset cannot find PrinterModel, it will be found from the inherited parent preset
jira: STUDIO-10343 Change-Id: I4d3599ad4f7f4b21762cc0eee1174f6f05298e34
This commit is contained in:
parent
3e55bddcee
commit
7dd4b1e9e1
|
@ -2413,6 +2413,10 @@ bool Sidebar::reset_bed_type_combox_choices() {
|
|||
auto bundle = wxGetApp().preset_bundle;
|
||||
const Preset * curr = &bundle->printers.get_selected_preset();
|
||||
const VendorProfile::PrinterModel *pm = PresetUtils::system_printer_model(*curr);
|
||||
if (!pm) {
|
||||
auto curr_parent = bundle->printers.get_selected_preset_parent();
|
||||
pm = PresetUtils::system_printer_model(*curr_parent);
|
||||
}
|
||||
if (m_last_combo_bedtype_count != 0 && pm) {
|
||||
auto cur_count = (int) BedType::btCount - 1 - pm->not_support_bed_types.size();
|
||||
if (cur_count == m_last_combo_bedtype_count) {//no change
|
||||
|
|
Loading…
Reference in New Issue