Prevents an infinite loop when a FormGroup has no widget which can accept the focus
This commit is contained in:
+2
-2
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user