From cf3e1a10b5222ac19527c9f263cbf9d9fc716659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20=C5=9Aleszy=C5=84ski?= Date: Tue, 13 Apr 2021 10:56:37 +0200 Subject: [PATCH] [EGD-6500] Clear calculator input on # long press Long pound press should clear input text. --- .../application-calculator/windows/CalculatorMainWindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module-apps/application-calculator/windows/CalculatorMainWindow.cpp b/module-apps/application-calculator/windows/CalculatorMainWindow.cpp index da1af14fb28d609a610ea5745aeb9feb281d07c0..d1b30e34966b51fae4bef7d75ec142a0fe939d3c 100644 --- a/module-apps/application-calculator/windows/CalculatorMainWindow.cpp +++ b/module-apps/application-calculator/windows/CalculatorMainWindow.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "CalculatorMainWindow.hpp" @@ -60,6 +60,10 @@ namespace gui mathOperationInput->clear(); clearInput = false; } + if (event.isLongPress() && event.is(gui::KeyCode::KEY_PND)) { + mathOperationInput->clear(); + return true; + } if (!event.isShortPress()) { return false; }