Skip to content

Commit

Permalink
fix(color): wrong selection order of model buttons on manage models p…
Browse files Browse the repository at this point in the history
…age (#5567)
  • Loading branch information
philmoz authored Sep 29, 2024
1 parent c1c600c commit 14437cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions radio/src/gui/colorlcd/model/model_select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ class ModelsPageBody : public Window

void update()
{
for (auto b : modelButtons)
for (auto b : modelButtons) {
b->hide();
lv_group_remove_obj(b->getLvObj());
}

ModelsVector models;
if (selectedLabels.size()) {
Expand Down Expand Up @@ -245,7 +247,7 @@ class ModelsPageBody : public Window
if (button) {
button->setPos(x, y);
button->show();
lv_obj_move_foreground(button->getLvObj());
lv_group_add_obj(lv_group_get_default(), button->getLvObj());
} else {
button = new ModelButton(
this, {x, y, w, h}, model, [=]() { focusedModel = model; },
Expand Down

0 comments on commit 14437cf

Please sign in to comment.