FIX:fixed wrong dev_id of printer object

The current printer object was not determined when restoring calibration data from appconfig

Change-Id: I2b74ee5911aef27e91136b8f6051a66199419d56
This commit is contained in:
tao wang 2023-07-07 21:07:30 +08:00 committed by Lane.Wei
parent 225095d938
commit a93d09cc30

View file

@ -227,9 +227,11 @@ void CalibrationWizard::recover_preset_info(MachineObject *obj)
{
std::vector<PrinterCaliInfo> back_infos = wxGetApp().app_config->get_printer_cali_infos();
for (const auto& back_info : back_infos) {
obj->dev_id = back_info.dev_id;
obj->cache_flow_ratio = back_info.cache_flow_ratio;
obj->selected_cali_preset = back_info.selected_presets;
if (obj && (obj->dev_id == back_info.dev_id) ) {
obj->dev_id = back_info.dev_id;
obj->cache_flow_ratio = back_info.cache_flow_ratio;
obj->selected_cali_preset = back_info.selected_presets;
}
}
}