diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index 29cdc7249..d7ec6b590 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -47,6 +47,7 @@ enum PrintStep { // psToolOrdering is a synonym to psWipeTower, as the Wipe Tower calculates and modifies the ToolOrdering, // while if printing without the Wipe Tower, the ToolOrdering is calculated as well. psToolOrdering = psWipeTower, + psSlicingFinished = psToolOrdering, psGCodeExport, psCount, }; diff --git a/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/src/slic3r/GUI/BackgroundSlicingProcess.cpp index 605a98eea..c6b5ff233 100644 --- a/src/slic3r/GUI/BackgroundSlicingProcess.cpp +++ b/src/slic3r/GUI/BackgroundSlicingProcess.cpp @@ -122,7 +122,9 @@ void BackgroundSlicingProcess::process_fff() assert(m_print == m_fff_print); m_print->process(); wxCommandEvent evt(m_event_slicing_completed_id); - evt.SetInt((int)(m_fff_print->step_state_with_timestamp(PrintStep::psBrim).timestamp)); + // Post the Slicing Finished message for the G-code viewer to update. + // Passing the timestamp + evt.SetInt((int)(m_fff_print->step_state_with_timestamp(PrintStep::psSlicingFinished).timestamp)); wxQueueEvent(GUI::wxGetApp().mainframe->m_plater, evt.Clone()); #if ENABLE_GCODE_VIEWER m_fff_print->export_gcode(m_temp_output_path, m_gcode_result, m_thumbnail_cb);