mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-29 09:57:44 +01:00
if showing an empty model in a pianoroll, set the visible channel to 1
This commit is contained in:
parent
dd3683bc06
commit
ef8f2579c1
1 changed files with 8 additions and 1 deletions
|
|
@ -369,11 +369,18 @@ MidiView::set_model (std::shared_ptr<MidiModel> m)
|
|||
//set_height (trackview.current_height());
|
||||
|
||||
if (_show_source) {
|
||||
for (int n = 0; n < 16; ++n) {
|
||||
int n = 0;
|
||||
|
||||
while (n < 16) {
|
||||
if (_model->channels_present() & (1 << n)) {
|
||||
set_visible_channel (n);
|
||||
break;
|
||||
}
|
||||
++n;
|
||||
}
|
||||
|
||||
if (n == 16) {
|
||||
set_visible_channel (n);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue