From 2897570cbe9a8d5a34bf545d9744ab29154eeda6 Mon Sep 17 00:00:00 2001 From: victor Date: Mon, 4 Sep 2017 10:33:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BF=A8=EB=8B=A4=EC=9A=B4=20=EC=A2=85?= =?UTF-8?q?=EB=A3=8C=20=ED=9B=84=20=EB=88=8C=EB=9F=AC=EB=86=A8=EB=8D=98=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=EC=9C=BC=EB=A1=9C=20=ED=8F=AC=EC=BB=A4?= =?UTF-8?q?=EC=8A=A4=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gui/oven_control/washwindow.cpp | 7 +++++++ app/gui/oven_control/washwindow.h | 2 ++ 2 files changed, 9 insertions(+) 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; -- 2.1.4