form: add field even if form cannot have focus (but forwards it)

This commit is contained in:
Raphael Coeffic
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent b747b79273
commit 5878802c9b
+1 -1
View File
@@ -63,7 +63,7 @@ FormField::FormField(Window* parent, const rect_t& rect,
LvglCreate objConstruct) :
Window(parent, rect, windowFlags, textFlags, objConstruct)
{
if (!(windowFlags & NO_FOCUS)) {
if (!(windowFlags & NO_FOCUS) || (windowFlags & FORM_FORWARD_FOCUS)) {
auto cont = dynamic_cast<FieldContainer*>(parent);
if (cont) {
cont->addField(this);