mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-26 17:48:35 -07: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:
parent
df3fe1491a
commit
72fa3fbb26
1 changed files with 4 additions and 3 deletions
|
|
@ -483,6 +483,7 @@ void AMSMaterialsSetting::on_select_reset(wxCommandEvent& event) {
|
|||
wxColour color = *wxWHITE;
|
||||
char col_buf[10];
|
||||
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;
|
||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||
|
|
@ -508,14 +509,14 @@ void AMSMaterialsSetting::on_select_reset(wxCommandEvent& event) {
|
|||
else {
|
||||
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){
|
||||
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 {
|
||||
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…
Add table
Add a link
Reference in a new issue