FIX:when ams cali_idx is unknown, use default item
2. use transparent color when reset filament jira: 7946 Change-Id: I129dc0e6b7244cad3b5e61e1bc423938f4b92d7e
This commit is contained in:
parent
aba72bb04f
commit
7f473c2027
|
@ -483,7 +483,7 @@ void AMSMaterialsSetting::on_select_reset(wxCommandEvent& event) {
|
||||||
long nozzle_temp_max_int = 0;
|
long nozzle_temp_max_int = 0;
|
||||||
wxColour color = *wxWHITE;
|
wxColour color = *wxWHITE;
|
||||||
char col_buf[10];
|
char col_buf[10];
|
||||||
sprintf(col_buf, "%02X%02X%02XFF", (int)color.Red(), (int)color.Green(), (int)color.Blue());
|
sprintf(col_buf, "%02X%02X%02X00", (int)color.Red(), (int)color.Green(), (int)color.Blue());
|
||||||
|
|
||||||
std::string selected_ams_id;
|
std::string selected_ams_id;
|
||||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||||
|
@ -1208,12 +1208,12 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
||||||
if(!selected_tray)
|
if(!selected_tray)
|
||||||
return;
|
return;
|
||||||
cali_select_idx = CalibUtils::get_selected_calib_idx(m_pa_profile_items, selected_tray->cali_idx);
|
cali_select_idx = CalibUtils::get_selected_calib_idx(m_pa_profile_items, selected_tray->cali_idx);
|
||||||
if (cali_select_idx >= 0) {
|
if (cali_select_idx < 0) {
|
||||||
m_comboBox_cali_result->SetSelection(cali_select_idx);
|
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;
|
||||||
else {
|
cali_select_idx = 0;
|
||||||
m_comboBox_cali_result->SetSelection(0);
|
|
||||||
}
|
}
|
||||||
|
m_comboBox_cali_result->SetSelection(cali_select_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cali_select_idx >= 0) {
|
if (cali_select_idx >= 0) {
|
||||||
|
|
Loading…
Reference in New Issue