mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 04:39:33 +01:00
Fix note range toggling (ie actually change visible range when menu option selected). Still some issue with initial value...
Don't raise tempo lines to top on editor canvas, they steal events. Same problem on time canvas, but harder to solve... git-svn-id: svn://localhost/ardour2/trunk@2255 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f68caf23dd
commit
684ef0eb7a
3 changed files with 29 additions and 5 deletions
|
|
@ -57,7 +57,7 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv)
|
|||
: StreamView (tv)
|
||||
, _range(ContentsRange)
|
||||
, _lowest_note(60)
|
||||
, _highest_note(71)
|
||||
, _highest_note(60)
|
||||
{
|
||||
if (tv.is_track())
|
||||
stream_base_color = ARDOUR_UI::config()->canvasvar_MidiTrackBase.get();
|
||||
|
|
@ -189,6 +189,14 @@ MidiStreamView::redisplay_diskstream ()
|
|||
if (_trackview.is_midi_track()) {
|
||||
_trackview.get_diskstream()->playlist()->foreach_region (static_cast<StreamView*>(this), &StreamView::add_region_view);
|
||||
}
|
||||
|
||||
/* Always display at least one octave */
|
||||
if (_highest_note == 127) {
|
||||
if (_lowest_note > (127 - 11))
|
||||
_lowest_note = 127 - 11;
|
||||
} else if (_highest_note < _lowest_note + 11) {
|
||||
_highest_note = _lowest_note + 11;
|
||||
}
|
||||
|
||||
for (i = region_views.begin(); i != region_views.end(); ) {
|
||||
tmp = i;
|
||||
|
|
@ -238,6 +246,21 @@ MidiStreamView::draw_note_separators()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MidiStreamView::set_note_range(VisibleNoteRange r)
|
||||
{
|
||||
_range = r;
|
||||
if (r == FullRange) {
|
||||
_lowest_note = 0;
|
||||
_highest_note = 127;
|
||||
} else {
|
||||
_lowest_note = 60;
|
||||
_highest_note = 60;
|
||||
}
|
||||
redisplay_diskstream();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue