maybe finally fix data-note-range display for pianoroll after set-region

This commit is contained in:
Paul Davis
2025-07-31 12:05:10 -06:00
parent d654d98661
commit 6f3e461356
2 changed files with 5 additions and 0 deletions

View File

@@ -588,7 +588,11 @@ Pianoroll::canvas_allocate (Gtk::Allocation alloc)
_track_canvas_width = _visible_canvas_width - prh->x1();
if (zoom_in_allocate) {
zoom_to_show (timecnt_t (timepos_t (max_extents_scale() * max_zoom_extent ().second.samples())));
if (_region) {
bg->display_region (*view);
}
zoom_in_allocate = false;
}

View File

@@ -111,4 +111,5 @@ PianorollMidiBackground::display_region (MidiView& mv)
std::shared_ptr<ARDOUR::SMFSource> smf (std::dynamic_pointer_cast<ARDOUR::SMFSource> (mv.midi_region()->source()));
assert (smf);
(void) update_data_note_range (smf->model()->lowest_note(), smf->model()->highest_note());
apply_note_range (smf->model()->lowest_note(), smf->model()->highest_note(), true, RangeCanMove (CanMoveTop|CanMoveBottom));
}