1. fixed checkbox focus on touch

2. fixed crash if you edit a textbox and close the simu.  TextEdit changeEnd() wasnt checking lvgl for validity
3. removed dead code in new TextEdit onTouchEnd()
This commit is contained in:
kevinkoenig
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent 0429341528
commit 6a8707fb69
4 changed files with 31 additions and 12 deletions
+12
View File
@@ -85,3 +85,15 @@ void CheckBox::onEvent(event_t event)
}
#endif
#if defined(HARDWARE_TOUCH)
bool CheckBox::onTouchEnd(coord_t x, coord_t y)
{
if (!hasFocus()) {
setFocus(SET_FOCUS_DEFAULT);
}
return true;
}
#endif