13
0

lincoln's patch to make MIDI note lines go away at smaller track heights

git-svn-id: svn://localhost/ardour2/branches/3.0@7194 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-05-29 12:16:13 +00:00
parent 890afb2128
commit b1d5a11194

View File

@ -212,7 +212,9 @@ void
MidiStreamView::display_track (boost::shared_ptr<Track> tr) MidiStreamView::display_track (boost::shared_ptr<Track> tr)
{ {
StreamView::display_track (tr); StreamView::display_track (tr);
draw_note_lines(); draw_note_lines();
NoteRangeChanged(); NoteRangeChanged();
} }
@ -296,6 +298,7 @@ MidiStreamView::update_contents_height ()
{ {
StreamView::update_contents_height(); StreamView::update_contents_height();
_note_lines->property_y2() = height; _note_lines->property_y2() = height;
draw_note_lines(); draw_note_lines();
} }
@ -307,6 +310,10 @@ MidiStreamView::draw_note_lines()
uint32_t color; uint32_t color;
_note_lines->clear(); _note_lines->clear();
if(height < 140){
return;
}
for (int i = lowest_note(); i <= highest_note(); ++i) { for (int i = lowest_note(); i <= highest_note(); ++i) {
y = floor(note_to_y(i)); y = floor(note_to_y(i));