mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-27 09:59:48 -07:00
FIX: crash when select filament in device
jira: STUDIO-7972 Change-Id: Ice9e7360fbfe0c07bd49bbd696bb3cfb662e94e4 (cherry picked from commit 4c644d47157dd5cc403d6a1640c5874b99b10c4a)
This commit is contained in:
parent
e9e661a9db
commit
df3fe1491a
1 changed files with 14 additions and 10 deletions
|
|
@ -1185,17 +1185,21 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
|||
}
|
||||
}
|
||||
else {
|
||||
Ams* selected_ams = this->obj->amsList[std::to_string(ams_id)];
|
||||
if(!selected_ams) return;
|
||||
AmsTray* selected_tray = selected_ams->trayList[std::to_string(tray_id)];
|
||||
if(!selected_tray) return;
|
||||
cali_select_idx = CalibUtils::get_selected_calib_idx(m_pa_profile_items, selected_tray->cali_idx);
|
||||
if (cali_select_idx < 0) {
|
||||
BOOST_LOG_TRIVIAL(info) << "extrusion_cali_status_error: cannot find pa profile, ams_id = " << ams_id
|
||||
<< ", slot_id = " << slot_id << ", cali_idx = " << selected_tray->cali_idx;
|
||||
cali_select_idx = 0;
|
||||
if (this->obj->amsList.find(std::to_string(ams_id)) != this->obj->amsList.end()) {
|
||||
Ams* selected_ams = this->obj->amsList[std::to_string(ams_id)];
|
||||
if (!selected_ams)
|
||||
return;
|
||||
AmsTray* selected_tray = selected_ams->trayList[std::to_string(slot_id)];
|
||||
if (!selected_tray)
|
||||
return;
|
||||
cali_select_idx = CalibUtils::get_selected_calib_idx(m_pa_profile_items, selected_tray->cali_idx);
|
||||
if (cali_select_idx < 0) {
|
||||
BOOST_LOG_TRIVIAL(info) << "extrusion_cali_status_error: cannot find pa profile, ams_id = " << ams_id
|
||||
<< ", slot_id = " << slot_id << ", cali_idx = " << selected_tray->cali_idx;
|
||||
cali_select_idx = 0;
|
||||
}
|
||||
m_comboBox_cali_result->SetSelection(cali_select_idx);
|
||||
}
|
||||
m_comboBox_cali_result->SetSelection(cali_select_idx);
|
||||
}
|
||||
|
||||
if (cali_select_idx >= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue