mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX:when ams cali_idx is unknown, use default item
2. use transparent color when reset filament jira: 7946 Change-Id: I129dc0e6b7244cad3b5e61e1bc423938f4b92d7e (cherry picked from commit 7f473c2027e31458664e184645cf46f8e9b5d307)
This commit is contained in:
@@ -482,7 +482,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;
|
||||||
@@ -1190,12 +1190,12 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
|
|||||||
AmsTray* selected_tray = selected_ams->trayList[std::to_string(tray_id)];
|
AmsTray* selected_tray = selected_ams->trayList[std::to_string(tray_id)];
|
||||||
if(!selected_tray) return;
|
if(!selected_tray) 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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user