Fix genererally retarded and broken note range / diskstream display / etc. related things (correctly display region contents on initial session load).

git-svn-id: svn://localhost/ardour2/branches/3.0@4583 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-02-15 19:44:27 +00:00
parent ecaf107ed3
commit 166395c96b
16 changed files with 153 additions and 137 deletions

View file

@ -33,6 +33,7 @@
#include <pbd/basename.h>
#include <ardour/audioengine.h>
#include <ardour/midi_model.h>
#include <ardour/midi_ring_buffer.h>
#include <ardour/midi_source.h>
#include <ardour/session.h>
@ -51,9 +52,7 @@ sigc::signal<void,MidiSource *> MidiSource::MidiSourceCreated;
MidiSource::MidiSource (Session& s, string name)
: Source (s, name, DataType::MIDI)
, _timeline_position(0)
, _model(new MidiModel(this))
, _writing (false)
, _model_iter(*_model.get(), 0.0)
, _last_read_end(0)
{
_read_data_count = 0;
@ -63,9 +62,7 @@ MidiSource::MidiSource (Session& s, string name)
MidiSource::MidiSource (Session& s, const XMLNode& node)
: Source (s, node)
, _timeline_position(0)
, _model(new MidiModel(this))
, _writing (false)
, _model_iter(*_model.get(), 0.0)
, _last_read_end(0)
{
_read_data_count = 0;
@ -237,3 +234,11 @@ MidiSource::session_saved()
}
}
void
MidiSource::set_note_mode(NoteMode mode)
{
if (_model) {
_model->set_note_mode(mode);
}
}