Skip to content

Commit

Permalink
fix(color): Mixes list display incorrect after deleting all mixer lin…
Browse files Browse the repository at this point in the history
…es (#4477)
  • Loading branch information
philmoz authored and pfeerick committed Jan 3, 2024
1 parent 47e1116 commit 8a78f27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions radio/src/gui/colorlcd/model_mixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,13 @@ void ModelMixesPage::build(FormWindow * window)
MixData* line = g_model.mixData;
for (uint8_t ch = 0; (ch < MAX_OUTPUT_CHANNELS) && (index < MAX_MIXERS); ch++) {

if (line->destCh == ch) {
bool skip_mix = (ch == 0 && is_memclear(line, sizeof(MixData)));
if (line->destCh == ch && !skip_mix) {

// one group for the complete mixer channel
auto group = createGroup(form, MIXSRC_CH1 + ch);
groups.emplace_back(group);
while (index < MAX_MIXERS && (line->destCh == ch)) {
while (index < MAX_MIXERS && (line->destCh == ch) && !skip_mix) {
// one button per input line
auto btn = createLineButton(group, index);
if (!focusSet) {
Expand All @@ -452,6 +453,7 @@ void ModelMixesPage::build(FormWindow * window)
}
++index;
++line;
skip_mix = (ch == 0 && is_memclear(line, sizeof(MixData)));
}
}
}
Expand Down

0 comments on commit 8a78f27

Please sign in to comment.