From 14b1675732a809b66d6a032a5facba0293cf5742 Mon Sep 17 00:00:00 2001 From: Wojtek Rzepecki Date: Wed, 7 Jul 2021 14:19:50 +0200 Subject: [PATCH] [EGD-7105] Fix window with timeout Fix window whith timeout to prevent recursive returns to previous window --- module-apps/apps-common/popups/WindowWithTimer.cpp | 5 +++++ module-apps/apps-common/popups/WindowWithTimer.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/module-apps/apps-common/popups/WindowWithTimer.cpp b/module-apps/apps-common/popups/WindowWithTimer.cpp index cb0471b174436dfa8ec82fa6a2088ba121b203d9..efddfdaf6cc3dd31f60e61583f631a591e21d8fa 100644 --- a/module-apps/apps-common/popups/WindowWithTimer.cpp +++ b/module-apps/apps-common/popups/WindowWithTimer.cpp @@ -52,6 +52,11 @@ namespace gui resetTimer(); } + void WindowWithTimer::onClose() + { + detachTimerIfExists(); + } + WindowWithTimer::~WindowWithTimer() { destroyInterface(); diff --git a/module-apps/apps-common/popups/WindowWithTimer.hpp b/module-apps/apps-common/popups/WindowWithTimer.hpp index 821c68b25c1e37acfc6d9bd6449e59cf1ba1a659..20251b94751a8cca858e70e7fe0fef3df7ffb9de 100644 --- a/module-apps/apps-common/popups/WindowWithTimer.hpp +++ b/module-apps/apps-common/popups/WindowWithTimer.hpp @@ -22,6 +22,7 @@ namespace gui void destroyInterface() override; ~WindowWithTimer() override; void onBeforeShow(ShowMode mode, SwitchData *data) override; + void onClose() override; bool onInput(const gui::InputEvent &inputEvent) override; protected: