mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
FIX: add filament_id when reset ams setting
jira: none Change-Id: Iedd2eec94bd1e41a51cededc06b304a2e29ef808 (cherry picked from commit 4c6316b98137dc230c6a0c2093ffb290c09ccef7)
This commit is contained in:
@@ -484,6 +484,19 @@ void AMSMaterialsSetting::on_select_reset(wxCommandEvent& event) {
|
||||
char col_buf[10];
|
||||
sprintf(col_buf, "%02X%02X%02XFF", (int)color.Red(), (int)color.Green(), (int)color.Blue());
|
||||
|
||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||
if (preset_bundle) {
|
||||
for (auto it = preset_bundle->filaments.begin(); it != preset_bundle->filaments.end(); it++) {
|
||||
auto filament_item = map_filament_items[m_comboBox_filament->GetValue().ToStdString()];
|
||||
std::string filament_id = filament_item.filament_id;
|
||||
if (it->filament_id.compare(filament_id) == 0) {
|
||||
ams_filament_id = it->filament_id;
|
||||
ams_setting_id = it->setting_id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (obj) {
|
||||
// set filament
|
||||
if (is_virtual_tray()) {
|
||||
|
||||
Reference in New Issue
Block a user