13
0

Trim note display to not overlap the end of its region. Should fix #3202 and #2143.

git-svn-id: svn://localhost/ardour2/branches/3.0@7466 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-07-22 01:45:52 +00:00
parent cb80dbd927
commit 94918c2a63

View File

@ -1335,7 +1335,9 @@ MidiRegionView::update_note (CanvasNote* ev)
boost::shared_ptr<NoteType> note = ev->note(); boost::shared_ptr<NoteType> note = ev->note();
const nframes64_t note_start_frames = beats_to_frames(note->time()); const nframes64_t note_start_frames = beats_to_frames(note->time());
const nframes64_t note_end_frames = beats_to_frames(note->end_time());
/* trim note display to not overlap the end of its region */
const nframes64_t note_end_frames = min (beats_to_frames (note->end_time()), _region->start() + _region->length());
const double x = trackview.editor().frame_to_pixel(note_start_frames - _region->start()); const double x = trackview.editor().frame_to_pixel(note_start_frames - _region->start());
const double y1 = midi_stream_view()->note_to_y(note->note()); const double y1 = midi_stream_view()->note_to_y(note->note());