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:
committed by
Raphael Coeffic
parent
0429341528
commit
6a8707fb69
+12
-11
@@ -261,18 +261,19 @@ bool TextEdit::onTouchEnd(coord_t x, coord_t y)
|
||||
TextKeyboard::show(this);
|
||||
#endif
|
||||
|
||||
coord_t rest = x;
|
||||
for (cursorPos = 0; cursorPos < length; cursorPos++) {
|
||||
char c = value[cursorPos];
|
||||
if (c == '\0')
|
||||
break;
|
||||
uint8_t w = getCharWidth(c, fontspecsTable[0]) + 1;
|
||||
if (rest < w)
|
||||
break;
|
||||
rest -= w;
|
||||
}
|
||||
// coord_t rest = x;
|
||||
// for (cursorPos = 0; cursorPos < length; cursorPos++) {
|
||||
// char c = value[cursorPos];
|
||||
// if (c == '\0')
|
||||
// break;
|
||||
// uint8_t w = getCharWidth(c, fontspecsTable[0]) + 1;
|
||||
// if (rest < w)
|
||||
// break;
|
||||
// rest -= w;
|
||||
// }
|
||||
|
||||
// invalidate();
|
||||
|
||||
invalidate();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user