Skip to content

Commit

Permalink
fix(color): When in screen settings, ignore SYS/MDL, treat TELE as RTN (
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
philmoz authored Jul 25, 2023
1 parent 5386fe9 commit e79768b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion radio/src/gui/colorlcd/widgets_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit e79768b

Please sign in to comment.