diff --git a/radio/src/thirdparty/libopenui/src/button.cpp b/radio/src/thirdparty/libopenui/src/button.cpp index 3f2b349db..150381057 100644 --- a/radio/src/thirdparty/libopenui/src/button.cpp +++ b/radio/src/thirdparty/libopenui/src/button.cpp @@ -36,11 +36,9 @@ void Button::onEvent(event_t event) { TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString("Button").c_str(), event); - if (event == EVT_KEY_BREAK(KEY_ENTER)) { - if (enabled) { - onKeyPress(); - onPress(); - } + if (enabled && event == EVT_KEY_BREAK(KEY_ENTER)) { + onKeyPress(); + onPress(); } else { FormField::onEvent(event); diff --git a/radio/src/thirdparty/libopenui/src/checkbox.cpp b/radio/src/thirdparty/libopenui/src/checkbox.cpp index 18f0cb458..8fea8fcb3 100644 --- a/radio/src/thirdparty/libopenui/src/checkbox.cpp +++ b/radio/src/thirdparty/libopenui/src/checkbox.cpp @@ -30,7 +30,7 @@ void CheckBox::onEvent(event_t event) { TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString("CheckBox").c_str(), event); - if (event == EVT_KEY_BREAK(KEY_ENTER)) { + if (enabled && event == EVT_KEY_BREAK(KEY_ENTER)) { onKeyPress(); _setValue(!getValue()); invalidate();