From d520fc59ebae76460a8994f88753c7a2ea75ea69 Mon Sep 17 00:00:00 2001 From: "lane.wei" Date: Thu, 4 Jul 2024 15:21:22 +0800 Subject: [PATCH] ENH: context: update filament_maps under auto mode after process JIRA: no-jira Change-Id: Ia14ed67343b876532931e3106d667973d9ea233d --- src/slic3r/GUI/BackgroundSlicingProcess.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/src/slic3r/GUI/BackgroundSlicingProcess.cpp index 8be149499..8723ee770 100644 --- a/src/slic3r/GUI/BackgroundSlicingProcess.cpp +++ b/src/slic3r/GUI/BackgroundSlicingProcess.cpp @@ -225,6 +225,8 @@ void BackgroundSlicingProcess::process_fff() BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" %1%: gcode_result reseted, will start print::process")%__LINE__; m_print->process(); BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" %1%: after print::process, send slicing complete event to gui...")%__LINE__; + if (m_current_plate->get_filament_map_mode() == FilamentMapMode::fmmAuto) + m_current_plate->set_filament_maps(m_fff_print->get_filament_maps()); wxCommandEvent evt(m_event_slicing_completed_id); // Post the Slicing Finished message for the G-code viewer to update. @@ -841,7 +843,7 @@ void BackgroundSlicingProcess::prepare_upload() throw Slic3r::RuntimeError(_utf8(L("Copying of the temporary G-code to the output G-code failed"))); m_upload_job.upload_data.upload_path = m_fff_print->print_statistics().finalize_output_path(m_upload_job.upload_data.upload_path.string()); // Make a copy of the source path, as run_post_process_scripts() is allowed to change it when making a copy of the source file - // (not here, but when the final target is a file). + // (not here, but when the final target is a file). std::string source_path_str = source_path.string(); std::string output_name_str = m_upload_job.upload_data.upload_path.string(); if (run_post_process_scripts(source_path_str, false, m_upload_job.printhost->get_name(), output_name_str, m_fff_print->full_print_config()))