diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-01-08 10:21:55 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-01-08 10:22:08 -0700 |
commit | 2ae327fa8f8e482a27bde3e09e9f8cb8d10bb136 (patch) | |
tree | 1e1eccc8adb9a1496335295f976e4884b08eac77 /gtk2_ardour | |
parent | 563a8b15e0205d24af0c93a6c38df0965ea7e5cd (diff) |
prevent MIDI note starts being drawn earlier than their region start
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 01fcfab51e..4612b7fd97 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -1756,12 +1756,11 @@ MidiRegionView::update_sustained (Note* ev, bool update_ghost_regions) const double session_source_start = _region->quarter_note() - mr->start_beats(); const samplepos_t note_start_samples = map.sample_at_quarter_note (note->time().to_double() + session_source_start) - _region->position(); - const double x0 = trackview.editor().sample_to_pixel (note_start_samples); + const double x0 = max (0.,trackview.editor().sample_to_pixel (note_start_samples)); double x1; const double y0 = 1 + floor(note_to_y(note->note())); double y1; - /* trim note display to not overlap the end of its region */ if (note->length().to_double() > 0.0) { double note_end_time = note->end_time().to_double(); |