if showing an empty model in a pianoroll, set the visible channel to 1

This commit is contained in:
Paul Davis 2025-03-17 10:00:44 -06:00
parent dd3683bc06
commit ef8f2579c1

View file

@ -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);
}
}