better handling of MidiView::apply_note_range()

In particular, keep the MidiViewBackground's sense of the data range intact,
use MidiModel::{highest,lowest}_note(), center ranges that don't fit
on the data range
This commit is contained in:
Paul Davis 2025-07-01 17:31:35 -06:00
parent 6a4f4e4710
commit 5767c8f62e
3 changed files with 29 additions and 23 deletions

View file

@ -137,6 +137,8 @@ class MidiViewBackground : public virtual ViewBackground
sigc::signal<void,bool> NoteVisibilityShouldChange;
bool update_data_note_range (uint8_t min, uint8_t max);
protected:
EditingContext& _editing_context;
bool _range_dirty;
@ -156,7 +158,6 @@ class MidiViewBackground : public virtual ViewBackground
void parameter_changed (std::string const &);
void note_range_adjustment_changed();
void setup_note_lines();
bool update_data_note_range (uint8_t min, uint8_t max);
void update_contents_height ();
virtual void apply_note_range_to_children () = 0;
virtual bool updates_suspended() const { return false; }