From 6757906ad36f68923cbcc9d5892f3795d8e7bbb8 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Wed, 1 Oct 2025 12:29:30 +0800 Subject: [PATCH] Fix `chamber_temperature` crash --- src/slic3r/GUI/ConfigManipulation.cpp | 4 ++-- src/slic3r/GUI/SelectMachine.cpp | 2 +- src/slic3r/GUI/Tab.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 54fa8de0b2..61636972f4 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -156,11 +156,11 @@ void ConfigManipulation::check_chamber_temperature(DynamicPrintConfig* config) {"PETG-CF",55} }; bool support_chamber_temp_control=GUI::wxGetApp().preset_bundle->printers.get_selected_preset().config.opt_bool("support_chamber_temp_control"); - if (support_chamber_temp_control&&config->has("chamber_temperatures")) { + if (support_chamber_temp_control&&config->has("chamber_temperature")) { std::string filament_type = config->option("filament_type")->get_at(0); auto iter = recommend_temp_map.find(filament_type); if (iter!=recommend_temp_map.end()) { - if (iter->second < config->option("chamber_temperatures")->get_at(0)) { + if (iter->second < config->option("chamber_temperature")->get_at(0)) { wxString msg_text = wxString::Format(_L("Current chamber temperature is higher than the material's safe temperature, this may result in material softening and clogging. " "The maximum safe temperature for the material is %d"), iter->second); MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK); diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 667e40a163..2fb39932b2 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -3508,7 +3508,7 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_) std::unordered_set known_fila_soften_extruders; std::unordered_set unknown_fila_soften_extruders; auto preset_full_config = wxGetApp().preset_bundle->full_config(); - auto chamber_temperatures = preset_full_config.option("chamber_temperatures"); + auto chamber_temperatures = preset_full_config.option("chamber_temperature"); for (const FilamentInfo& item : m_ams_mapping_result) { try { diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 80e2ff4e09..9482761b3b 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3787,7 +3787,7 @@ void TabFilament::build() else if (opt_key == "nozzle_temperature_initial_layer") { m_config_manipulation.check_nozzle_temperature_initial_layer_range(&filament_config); } - else if (opt_key == "chamber_temperatures") { + else if (opt_key == "chamber_temperature") { m_config_manipulation.check_chamber_temperature(&filament_config); } @@ -4066,7 +4066,7 @@ void TabFilament::toggle_options() toggle_line("filament_diameter", !is_pellet_printer); bool support_chamber_temp_control = this->m_preset_bundle->printers.get_edited_preset().config.opt_bool("support_chamber_temp_control"); - toggle_line("chamber_temperatures", support_chamber_temp_control); + toggle_line("chamber_temperature", support_chamber_temp_control); } if (m_active_page->title() == L("Setting Overrides"))