mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 00:42:45 +01:00
Codechange: use StrEmpty instead of number of bytes in string to check for empty
This commit is contained in:
@@ -2528,7 +2528,7 @@ EventState Window::HandleEditBoxKey(WidgetID wid, char32_t key, uint16_t keycode
|
||||
break;
|
||||
|
||||
case QueryString::ACTION_CLEAR:
|
||||
if (query->text.bytes <= 1) {
|
||||
if (StrEmpty(query->text.GetText())) {
|
||||
/* If already empty, unfocus instead */
|
||||
this->UnfocusFocusedWidget();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user