Prevents an infinite loop when a FormGroup has no widget which can accept the focus

This commit is contained in:
Bertrand Songis
2021-02-22 17:24:50 +01:00
parent e20f856475
commit e71b959624
+2 -2
View File
@@ -196,14 +196,14 @@ void FormGroup::setFocus(uint8_t flag)
else if (next) { else if (next) {
next->setFocus(SET_FOCUS_FORWARD); next->setFocus(SET_FOCUS_FORWARD);
} }
else { else if (!(windowFlags & NO_FOCUS)) {
clearFocus(); clearFocus();
focusWindow = this; focusWindow = this;
} }
break; break;
} }
} }
else { else if (!(windowFlags & NO_FOCUS)) {
FormField::setFocus(flag); FormField::setFocus(flag);
} }
} }