From 14437cf777ac5d4c7805f71e3393059089b7df1d Mon Sep 17 00:00:00 2001 From: philmoz Date: Mon, 30 Sep 2024 09:44:50 +1000 Subject: [PATCH] fix(color): wrong selection order of model buttons on manage models page (#5567) --- radio/src/gui/colorlcd/model/model_select.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/colorlcd/model/model_select.cpp b/radio/src/gui/colorlcd/model/model_select.cpp index 489e9c2cdc5..b630aa1dd9d 100644 --- a/radio/src/gui/colorlcd/model/model_select.cpp +++ b/radio/src/gui/colorlcd/model/model_select.cpp @@ -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()) { @@ -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; },