diff --git a/app/gui/oven_control/washwindow.cpp b/app/gui/oven_control/washwindow.cpp index 91afb25..f7e94c5 100644 --- a/app/gui/oven_control/washwindow.cpp +++ b/app/gui/oven_control/washwindow.cpp @@ -140,6 +140,7 @@ void WashWindow::start(int type) if (udp->getData().sensor1 > 60) { state = CoolDown; + lastFocus = focusWidget(); CooldownPopup *p = new CooldownPopup(this, 60); p->setWindowModality(Qt::WindowModal); @@ -159,6 +160,12 @@ void WashWindow::start(int type) void WashWindow::resume() { + if (lastFocus) + { + lastFocus->setFocus(); + lastFocus = NULL; + } + if (udp->getData().door_state) { state = CloseDoor; diff --git a/app/gui/oven_control/washwindow.h b/app/gui/oven_control/washwindow.h index 8919427..61c8691 100644 --- a/app/gui/oven_control/washwindow.h +++ b/app/gui/oven_control/washwindow.h @@ -62,6 +62,8 @@ private: bool canceled; int type; + QWidget *lastFocus = NULL; + QTimer returnToClockTimer; QWidget *pushed = NULL;