From e79768baf151d5089de977ac42bef3d2a6f8877c Mon Sep 17 00:00:00 2001 From: philmoz Date: Tue, 25 Jul 2023 15:22:16 +1000 Subject: [PATCH] fix(color): When in screen settings, ignore SYS/MDL, treat TELE as RTN (#3845) * Change behaviour of TELE button on widget setup page to work like RTN button. Prevents recursive loading of widget setup page. * Ignore SYS & MDL buttons on widget setup page. --- radio/src/gui/colorlcd/widgets_setup.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/colorlcd/widgets_setup.cpp b/radio/src/gui/colorlcd/widgets_setup.cpp index 7e7b1a62d3a..44553ad383b 100644 --- a/radio/src/gui/colorlcd/widgets_setup.cpp +++ b/radio/src/gui/colorlcd/widgets_setup.cpp @@ -137,9 +137,16 @@ void SetupWidgetsPage::deleteLater(bool detach, bool trash) void SetupWidgetsPage::onEvent(event_t event) { - if (event == EVT_KEY_FIRST(KEY_PAGEUP) || event == EVT_KEY_FIRST(KEY_PAGEDN)) { +#if defined(HARDWARE_KEYS) + if (event == EVT_KEY_FIRST(KEY_PAGEUP) || event == EVT_KEY_FIRST(KEY_PAGEDN) || + event == EVT_KEY_FIRST(KEY_SYS) || event == EVT_KEY_FIRST(KEY_MODEL)) { killEvents(event); + } else if (event == EVT_KEY_FIRST(KEY_TELE)) { + onCancel(); } else { FormWindow::onEvent(event); } +#else + FormWindow::onEvent(event); +#endif }