Merge the two separate 'add notes to midi region' interfaces (note and midievent).

Update note range dynamically while recording to fit incoming notes.


git-svn-id: svn://localhost/ardour2/trunk@2512 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2007-10-04 05:15:28 +00:00
parent 9bcd3f1d16
commit 79db28b0b8
8 changed files with 79 additions and 82 deletions

View file

@ -31,14 +31,23 @@ namespace Gnome {
namespace Canvas {
CanvasMidiEvent::CanvasMidiEvent(MidiRegionView& region, Item* item, const ARDOUR::Note* note)
CanvasMidiEvent::CanvasMidiEvent(MidiRegionView& region, Item* item, const ARDOUR::Note* note, bool copy_note)
: _region(region)
, _item(item)
, _state(None)
, _note(note)
, _note((copy_note && note) ? new ARDOUR::Note(*note) : note)
, _own_note(copy_note)
, _selected(false)
{
}
CanvasMidiEvent::~CanvasMidiEvent()
{
if (_own_note)
delete _note;
}
void
CanvasMidiEvent::selected(bool yn)