mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
fix PatchChangeTriggerWindow so that if the clip is empty, it shows everything, rather than nothing
This commit is contained in:
parent
18e5061b46
commit
32ea051fb7
1 changed files with 11 additions and 0 deletions
|
|
@ -855,17 +855,28 @@ PatchChangeTriggerWindow::reset (std::shared_ptr<Route> r, std::shared_ptr<MIDIT
|
|||
/* only show tabs for the chans that this region uses */
|
||||
Evoral::SMF::UsedChannels used = t->used_channels();
|
||||
uint32_t first_used_chan = 15;
|
||||
uint32_t used_cnt = 0;
|
||||
|
||||
for (uint32_t chn = 0; chn < 16; ++chn) {
|
||||
if (used.test(chn)) {
|
||||
if (chn < first_used_chan) {
|
||||
first_used_chan = chn;
|
||||
}
|
||||
_w[chn]->show();
|
||||
used_cnt++;
|
||||
} else {
|
||||
_w[chn]->hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (used_cnt == 0) {
|
||||
/* no channels in use - empty. So make everything visible */
|
||||
for (uint32_t chn = 0; chn < 16; ++chn) {
|
||||
_w[chn]->show ();
|
||||
}
|
||||
first_used_chan = 0;
|
||||
}
|
||||
|
||||
for (uint32_t chn = 0; chn < 16; ++chn) {
|
||||
_w[chn]->reset (r, t);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue