From 9291675a2393a44d6c1b40b8d8f57f5bc373783f Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Tue, 6 Apr 2021 08:47:54 +0200 Subject: [PATCH] [Checkbox] Fix when disabled --- radio/src/thirdparty/libopenui/src/checkbox.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/radio/src/thirdparty/libopenui/src/checkbox.cpp b/radio/src/thirdparty/libopenui/src/checkbox.cpp index 8fea8fcb3..9dd22bcfd 100644 --- a/radio/src/thirdparty/libopenui/src/checkbox.cpp +++ b/radio/src/thirdparty/libopenui/src/checkbox.cpp @@ -44,10 +44,12 @@ void CheckBox::onEvent(event_t event) #if defined(HARDWARE_TOUCH) bool CheckBox::onTouchEnd(coord_t x, coord_t y) { - onKeyPress(); - _setValue(!getValue()); - setFocus(SET_FOCUS_DEFAULT); - invalidate(); + if (enabled) { + onKeyPress(); + _setValue(!getValue()); + setFocus(SET_FOCUS_DEFAULT); + invalidate(); + } return true; } #endif