FIX: the default value is not correct

and the pa profile not display in AMS setting dialog after switch nozzle diameter
jira: 8620

Change-Id: If40bfe41ae13f5199f09baae3af09757498f1edf
This commit is contained in:
zhimin.zeng 2024-11-05 12:24:58 +08:00 committed by Lane.Wei
parent 672f81a3dc
commit f3064e223d
2 changed files with 5 additions and 1 deletions

View File

@ -1172,6 +1172,10 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt)
m_input_k_val->GetTextCtrl()->SetValue(float_to_string_with_precision(m_pa_profile_items[cali_select_idx].k_value));
m_input_n_val->GetTextCtrl()->SetValue(float_to_string_with_precision(m_pa_profile_items[cali_select_idx].n_coef));
}
else {
m_input_k_val->GetTextCtrl()->SetValue(float_to_string_with_precision(m_pa_profile_items[0].k_value));
m_input_n_val->GetTextCtrl()->SetValue(float_to_string_with_precision(m_pa_profile_items[0].n_coef));
}
}
else {
if (!ams_filament_id.empty()) {

View File

@ -55,7 +55,7 @@ bool AMSinfo::parse_ams_info(MachineObject *obj, Ams *ams, bool remain_flag, boo
info.ctype = it->second->ctype;
info.material_name = it->second->get_display_filament_type();
info.cali_idx = it->second->cali_idx;
info.filament_id = it->second->filament_setting_id;
info.filament_id = it->second->setting_id;
if (!it->second->color.empty()) {
info.material_colour = AmsTray::decode_color(it->second->color);
} else {