do not crash when loading old history files with MIDI edits; add all notes in region to canvas, but pay attention to visibility

git-svn-id: svn://localhost/ardour2/branches/3.0@5652 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-09-10 21:19:01 +00:00
parent 7b8adc78b6
commit 2ff1cd99af
4 changed files with 44 additions and 26 deletions

View file

@ -589,8 +589,6 @@ MidiStreamView::update_rec_regions (boost::shared_ptr<MidiModel> data, nframes_t
if (note->time() + region->position() > start + dur)
break;
mrv->add_note(note);
if (note->note() < _lowest_note) {
_lowest_note = note->note();
update_range = true;
@ -598,6 +596,9 @@ MidiStreamView::update_rec_regions (boost::shared_ptr<MidiModel> data, nframes_t
_highest_note = note->note();
update_range = true;
}
mrv->add_note (note, !update_range);
}
mrv->extend_active_notes();