FIX: fix a slicing state not correct issue in some corner case[Studio-2600]

add a new object in other plate when slicing a plate
it will stop the background slicing process
and it should also send a complete event

Change-Id: Ie7cbcb5a97251a002b7448eb8a9c5bbde1680956
(cherry picked from commit 710a2b273424d59313d7053f0f2c2b54b0c849c0)
This commit is contained in:
lane.wei 2023-06-16 09:25:51 +08:00 committed by Lane.Wei
parent 0fcc235e14
commit a7ec66c294
3 changed files with 20 additions and 8 deletions

View file

@ -184,6 +184,7 @@ public:
//BBS: improve the finished logic, also judge the m_gcode_result
//bool finished() const { return m_print->finished(); }
bool finished() const { return m_print->finished() && !m_gcode_result->moves.empty(); }
bool is_internal_cancelled() { return m_internal_cancelled; }
//BBS: add Plater to friend class
//need to call stop_internal in ui thread
@ -274,6 +275,7 @@ private:
//BBS: partplate related
GUI::PartPlate* m_current_plate;
PrinterTechnology m_printer_tech = ptUnknown;
bool m_internal_cancelled = false;
PrintState<BackgroundSlicingProcessStep, bspsCount> m_step_state;
bool set_step_started(BackgroundSlicingProcessStep step);