FIX: show message dialog when the machine's nozzle in unknown

jira: none
Change-Id: Ic9b0e668c5e8427df76503731865d1b3de8568c4
This commit is contained in:
zhimin.zeng 2025-03-17 15:58:27 +08:00 committed by lane.wei
parent 48e2efdc2f
commit d38cbada3e
1 changed files with 11 additions and 0 deletions

View File

@ -594,6 +594,17 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
<< ", settring_id = " << preset_info.setting_id << ", settring_id = " << preset_info.setting_id
<< ", name = " << preset_info.name; << ", name = " << preset_info.name;
} }
for (auto extruder : curr_obj->m_extder_data.extders) {
if (extruder.current_nozzle_type == NozzleType::ntUndefine) {
wxString name = _L("left");
if (extruder.id == 0) { name = _L("right"); }
wxString msg = wxString::Format(_L("Printer %s nozzle information has not been set. Please configure it before proceeding with the calibration."), name);
MessageDialog msg_dlg(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
msg_dlg.ShowModal();
break;
}
}
on_device_connected(curr_obj); on_device_connected(curr_obj);
}); });