FIX: modify color to empty string when reset filament
jira: none Change-Id: I3a32dc8307ec5d65c8c5b7b05a5bc1e2d7d2b5b7
This commit is contained in:
parent
12932832ae
commit
a0b563dc8f
|
@ -484,6 +484,7 @@ void AMSMaterialsSetting::on_select_reset(wxCommandEvent& event) {
|
||||||
wxColour color = *wxWHITE;
|
wxColour color = *wxWHITE;
|
||||||
char col_buf[10];
|
char col_buf[10];
|
||||||
sprintf(col_buf, "%02X%02X%02X00", (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 color_str; // reset use empty string
|
||||||
|
|
||||||
std::string selected_ams_id;
|
std::string selected_ams_id;
|
||||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||||
|
@ -509,14 +510,14 @@ void AMSMaterialsSetting::on_select_reset(wxCommandEvent& event) {
|
||||||
else {
|
else {
|
||||||
tar_tray = 0;
|
tar_tray = 0;
|
||||||
}
|
}
|
||||||
obj->command_ams_filament_settings(ams_id, tar_tray, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
obj->command_ams_filament_settings(ams_id, tar_tray, ams_filament_id, ams_setting_id, color_str, m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||||
}
|
}
|
||||||
else if(m_is_third){
|
else if(m_is_third){
|
||||||
if (obj->is_enable_np) {
|
if (obj->is_enable_np) {
|
||||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, color_str, m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, std::string(col_buf), m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
obj->command_ams_filament_settings(ams_id, slot_id, ams_filament_id, ams_setting_id, color_str, m_filament_type, nozzle_temp_min_int, nozzle_temp_max_int);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue