ENH: update hms panel and upgrade panel when disconnected

Change-Id: I75d724c99ec2029190641cd2cfa22b6337d0060d
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2022-11-30 14:29:27 +08:00 committed by Lane.Wei
parent 42633fda28
commit e344f8b8b9
5 changed files with 46 additions and 5 deletions

View file

@ -210,6 +210,21 @@ void HMSPanel::update(MachineObject *obj)
}
}
void HMSPanel::show_status(int status)
{
if (last_status == status) return;
last_status = status;
if (((status & (int)MonitorStatus::MONITOR_DISCONNECTED) != 0)
|| ((status & (int)MonitorStatus::MONITOR_DISCONNECTED_SERVER) != 0)
|| ((status & (int)MonitorStatus::MONITOR_CONNECTING) != 0)
|| ((status & (int)MonitorStatus::MONITOR_NO_PRINTER) != 0)
) {
delete_hms_panels();
Layout();
}
}
bool HMSPanel::Show(bool show)
{
return wxPanel::Show(show);