~aleteoryx/muditaos

cf3e1a10b5222ac19527c9f263cbf9d9fc716659 — Artur Śleszyński 5 years ago cbd7464
[EGD-6500] Clear calculator input on # long press

Long pound press should clear input text.
1 files changed, 5 insertions(+), 1 deletions(-)

M module-apps/application-calculator/windows/CalculatorMainWindow.cpp
M module-apps/application-calculator/windows/CalculatorMainWindow.cpp => module-apps/application-calculator/windows/CalculatorMainWindow.cpp +5 -1
@@ 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;
            }