FIX: auto stop liveview not restart

Change-Id: I815eddd44c825d9648ad036c7015e268acdb769a
Jira: none
This commit is contained in:
chunmao.guo 2024-09-14 16:48:30 +08:00 committed by Lane.Wei
parent 6588ff440b
commit 0b5a2e0dcc
1 changed files with 2 additions and 0 deletions

View File

@ -190,6 +190,7 @@ void MediaPlayCtrl::SetMachineObject(MachineObject* obj)
if (SecondsSinceLastInput() >= 900) { // 15 min
auto close = wxGetApp().app_config->get("liveview", "auto_stop_liveview") == "true";
if (close) {
m_next_retry = wxDateTime();
Stop(_L("Temporarily closed because there is no operating for a long time."));
return;
}
@ -198,6 +199,7 @@ void MediaPlayCtrl::SetMachineObject(MachineObject* obj)
if (obj && obj->is_in_printing()) {
m_print_idle = 0;
} else if (++m_print_idle >= 5) {
m_next_retry = wxDateTime();
Stop(_L("Temporarily closed because there is no printing for a while."));
}
}