mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +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;
|
||||
wxColour color = *wxWHITE;
|
||||
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;
|
||||
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)];
|
||||
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) {
|
||||
m_comboBox_cali_result->SetSelection(cali_select_idx);
|
||||
}
|
||||
else {
|
||||
m_comboBox_cali_result->SetSelection(0);
|
||||
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);
|
||||
}
|
||||
|
||||
if (cali_select_idx >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user