Fix note-grid, canvas bounding-box offset.
authorRobin Gareus <robin@gareus.org>
Thu, 16 Mar 2017 02:47:46 +0000 (03:47 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 16 Mar 2017 02:47:46 +0000 (03:47 +0100)
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.

gtk2_ardour/midi_streamview.cc

index 23d31932d836d4cf30f94974ae9711633d59fc41..fe121a47709550fc5c5a9d02e9f3c4c052008392 100644 (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);
                }