mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 02:52:10 +00:00
FIX: modify color to empty string when reset filament
jira: none Change-Id: I3a32dc8307ec5d65c8c5b7b05a5bc1e2d7d2b5b7 (cherry picked from commit a0b563dc8fbddd201198dd073471887d104a58cb)
This commit is contained in:
@@ -483,6 +483,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;
|
||||||
@@ -508,14 +509,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user