Fix M486 still presented even with obj exclusion disabled (#9202)

Make sure `m_enable_exclude_object` is initialized correctly from user config (SoftFever/OrcaSlicer#7775)
This commit is contained in:
Noisyfox 2025-04-13 17:38:13 +08:00 committed by GitHub
parent 2f8fa3fec2
commit 443034553b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1926,7 +1926,6 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder).c_str()); file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder).c_str());
//BBS: total layer number //BBS: total layer number
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Total_Layer_Number_Placeholder).c_str()); file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Total_Layer_Number_Placeholder).c_str());
m_enable_exclude_object = config().exclude_object;
//Orca: extra check for bbl printer //Orca: extra check for bbl printer
if (is_bbl_printers) { if (is_bbl_printers) {
if (print.calib_params().mode == CalibMode::Calib_None) { // Don't support skipping in cali mode if (print.calib_params().mode == CalibMode::Calib_None) { // Don't support skipping in cali mode
@ -4475,6 +4474,7 @@ void GCode::apply_print_config(const PrintConfig &print_config)
m_writer.apply_print_config(print_config); m_writer.apply_print_config(print_config);
m_config.apply(print_config); m_config.apply(print_config);
m_scaled_resolution = scaled<double>(print_config.resolution.value); m_scaled_resolution = scaled<double>(print_config.resolution.value);
m_enable_exclude_object = m_config.exclude_object;
#if ORCA_CHECK_GCODE_PLACEHOLDERS #if ORCA_CHECK_GCODE_PLACEHOLDERS
// If the gcode value is empty, set a value so that the check code within the parser is run // If the gcode value is empty, set a value so that the check code within the parser is run