Fix note-grid, canvas bounding-box offset.

Note lines on a MIDI-track were able to exceed the time-axis' height
towards the top. If a MIDI track was at the top, the TAV's canvas-group
would increase the overall bounding-box of the track-area and allow
tracks to visually bleed into the time markers group.
This commit is contained in:
Robin Gareus 2017-03-16 03:47:46 +01:00
parent 3aefd0e744
commit bbda37c28f
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ MidiStreamView::draw_note_lines()
double h = y - prev_y;
double mid = y + (h/2.0);
if (height > 1.0) { // XXX ? should that not be h >= 1 ?
if (mid >= 0 && h > 1.0) {
_note_lines->add (mid, h, color);
}