From 6368ebcc4cedede47eea86782a66aff352ce03b6 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 7 Oct 2009 15:41:12 +0000 Subject: [PATCH] save & restore MIDI track note mode git-svn-id: svn://localhost/ardour2/branches/3.0@5750 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_time_axis.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index b189827782..b281ba0529 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -201,6 +201,13 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, _channel_selector.set_channel_colors(CanvasNoteEvent::midi_channel_colors); } } + + if ((prop = xml_node->property ("note-mode")) != 0) { + _note_mode = NoteMode (string_2_enum(prop->value(), _note_mode)); + if (mode_menu) { + _percussion_mode_item->set_active (_note_mode == Percussive); + } + } } MidiTimeAxisView::~MidiTimeAxisView () @@ -437,6 +444,7 @@ MidiTimeAxisView::set_note_mode(NoteMode mode) if (_note_mode != mode || midi_track()->note_mode() != mode) { _note_mode = mode; midi_track()->set_note_mode(mode); + xml_node->add_property ("note-mode", enum_2_string(_note_mode)); _view->redisplay_diskstream(); } }