FIX: Disable print button when gcode has conflict

Also fix a crash bug due to setStarted and setDone.

Change-Id: Ib9b069fe4b7e5d1fc359f48e44b4032dd8249428
(cherry picked from commit 9ef190ed3ecd66d12617ad96e927ff34251395a2)
This commit is contained in:
manch1n 2023-03-23 10:09:37 +08:00 committed by Lane.Wei
parent e002885efc
commit d72b4c1bfe
9 changed files with 78 additions and 8 deletions

View file

@ -774,6 +774,28 @@ private:
Vec3d m_origin;
//BBS: modified_count
int m_modified_count {0};
//BBS
struct ConflictResult
{
bool conflicted;
PrintObject *obj1;
PrintObject *obj2;
//TODO
//the actual loaction
void set(PrintObject *o1, PrintObject *o2)
{
conflicted = true;
obj1 = o1;
obj2 = o2;
}
void reset()
{
conflicted = false;
obj1 = nullptr;
obj2 = nullptr;
}
}m_conflict_result;
// To allow GCode to set the Print's GCodeExport step status.
friend class GCode;