model select button focus fix

This commit is contained in:
gagarinlg
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent bde100b18c
commit f25dbdbd7e
-5
View File
@@ -477,7 +477,6 @@ class ModelCategoryPageBody : public FormWindow
this, {x, y, MODEL_SELECT_CELL_WIDTH, MODEL_SELECT_CELL_HEIGHT}, this, {x, y, MODEL_SELECT_CELL_WIDTH, MODEL_SELECT_CELL_HEIGHT},
model); model);
button->setPressHandler([=]() -> uint8_t { button->setPressHandler([=]() -> uint8_t {
if (button->hasFocus()) {
Menu *menu = new Menu(parent); Menu *menu = new Menu(parent);
if (model != modelslist.getCurrentModel()) { if (model != modelslist.getCurrentModel()) {
menu->addLine(STR_SELECT_MODEL, [=]() { menu->addLine(STR_SELECT_MODEL, [=]() {
@@ -578,10 +577,6 @@ class ModelCategoryPageBody : public FormWindow
}); });
}); });
} }
}
// else {
// button->setFocus(SET_FOCUS_DEFAULT);
// }
return 1; return 1;
}); });