Fixed assignment of the slicing timestamp to the slicing finished

notification.
This commit is contained in:
Vojtech Bubnik 2020-10-15 12:02:20 +02:00
parent 3fc12fdaaa
commit c388c42055
2 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,7 @@ enum PrintStep {
// psToolOrdering is a synonym to psWipeTower, as the Wipe Tower calculates and modifies the ToolOrdering, // 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. // while if printing without the Wipe Tower, the ToolOrdering is calculated as well.
psToolOrdering = psWipeTower, psToolOrdering = psWipeTower,
psSlicingFinished = psToolOrdering,
psGCodeExport, psGCodeExport,
psCount, psCount,
}; };

View File

@ -122,7 +122,9 @@ void BackgroundSlicingProcess::process_fff()
assert(m_print == m_fff_print); assert(m_print == m_fff_print);
m_print->process(); m_print->process();
wxCommandEvent evt(m_event_slicing_completed_id); 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()); wxQueueEvent(GUI::wxGetApp().mainframe->m_plater, evt.Clone());
#if ENABLE_GCODE_VIEWER #if ENABLE_GCODE_VIEWER
m_fff_print->export_gcode(m_temp_output_path, m_gcode_result, m_thumbnail_cb); m_fff_print->export_gcode(m_temp_output_path, m_gcode_result, m_thumbnail_cb);