Skip to content

Commit

Permalink
Fix order of model buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz committed Sep 27, 2024
1 parent 149e1a2 commit f6997a2
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 f6997a2

Please sign in to comment.