From e8d4f5e06daf76f81024484f4175ec0da350ed48 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 17 Mar 2025 10:12:42 -0600 Subject: [PATCH] when a pianoroll shows an empty MIDI model, use the user prefs for the note range --- gtk2_ardour/midi_view.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtk2_ardour/midi_view.cc b/gtk2_ardour/midi_view.cc index f25627897d..3321980e04 100644 --- a/gtk2_ardour/midi_view.cc +++ b/gtk2_ardour/midi_view.cc @@ -1154,6 +1154,13 @@ MidiView::model_changed() } } + /* Pick a reasonable default range if the model is mepty */ + + if (notes.empty()) { + low_note = UIConfiguration::instance().get_default_lower_midi_note(); + hi_note = UIConfiguration::instance().get_default_upper_midi_note(); + } + maybe_set_note_range (low_note, hi_note); }