fix(color): Mixes list display incorrect after deleting all mixer lines (#4477)
This commit is contained in:
@@ -425,12 +425,13 @@ void ModelMixesPage::build(FormWindow * window)
|
|||||||
MixData* line = g_model.mixData;
|
MixData* line = g_model.mixData;
|
||||||
for (uint8_t ch = 0; (ch < MAX_OUTPUT_CHANNELS) && (index < MAX_MIXERS); ch++) {
|
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
|
// one group for the complete mixer channel
|
||||||
auto group = createGroup(form, MIXSRC_FIRST_CH + ch);
|
auto group = createGroup(form, MIXSRC_FIRST_CH + ch);
|
||||||
groups.emplace_back(group);
|
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
|
// one button per input line
|
||||||
auto btn = createLineButton(group, index);
|
auto btn = createLineButton(group, index);
|
||||||
if (!focusSet) {
|
if (!focusSet) {
|
||||||
@@ -439,6 +440,7 @@ void ModelMixesPage::build(FormWindow * window)
|
|||||||
}
|
}
|
||||||
++index;
|
++index;
|
||||||
++line;
|
++line;
|
||||||
|
skip_mix = (ch == 0 && is_memclear(line, sizeof(MixData)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user