new pianoroll note range enum, denoting "user selected range"

This commit is contained in:
Paul Davis 2025-10-03 14:19:11 -06:00
parent f9b1de355d
commit df564f132b
3 changed files with 6 additions and 2 deletions

View file

@ -190,7 +190,9 @@ MidiViewBackground::setup_note_lines()
void
MidiViewBackground::set_note_visibility_range_style (VisibleNoteRange r)
{
if (r == ContentsRange) {
if (r == UserRange) {
_visibility_note_range = UserRange;
} else if (r == ContentsRange) {
if (apply_note_range (_data_note_min, _data_note_max, true)) {
_visibility_note_range = ContentsRange;
}

View file

@ -75,7 +75,8 @@ class MidiViewBackground : public virtual ViewBackground
enum VisibleNoteRange {
FullRange,
ContentsRange
ContentsRange,
UserRange
};
ARDOUR::NoteMode note_mode() const { return _note_mode; }

View file

@ -665,6 +665,7 @@ void
PianoRollHeaderBase::end_scroomer_drag ()
{
_scroomer_drag = false;
_midi_context.set_note_visibility_range_style (MidiViewBackground::UserRange);
}
bool