ENH: remeber extrusion cali preset in MachineObject

Change-Id: I32fcf6355ce948fc02c584b8639eb96fe2b444b5
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2023-05-23 09:06:11 +08:00 committed by Lane.Wei
parent 0d656621bf
commit 030275a5a1
3 changed files with 21 additions and 5 deletions

View file

@ -2237,12 +2237,17 @@ void StatusPanel::update_ams_control_state(bool is_support_virtual_tray, bool is
enable[ACTION_BTN_CALI] = false;
}
else {
if (obj->is_in_extrusion_cali()) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = false;
if (obj->is_in_printing()) {
if (obj->is_in_extrusion_cali()) {
enable[ACTION_BTN_LOAD] = false;
enable[ACTION_BTN_UNLOAD] = false;
enable[ACTION_BTN_CALI] = true;
} else {
enable[ACTION_BTN_CALI] = false;
}
} else {
enable[ACTION_BTN_CALI] = true;
} else
enable[ACTION_BTN_CALI] = false;
}
}
if (obj->is_in_printing() && !obj->can_resume()) {