From b0e91bfa0899435c7b798ebd35363147eb1b2823 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 3 Jun 2007 20:06:01 +0000 Subject: Fix MIDI region loading. Add model loading and destroying to SMFSource. Load and display MIDI region data on session load. git-svn-id: svn://localhost/ardour2/trunk@1947 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_command.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libs/ardour/session_command.cc') diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc index 10f319ace8..534f2ffe81 100644 --- a/libs/ardour/session_command.cc +++ b/libs/ardour/session_command.cc @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include #include @@ -93,11 +95,11 @@ Session::memento_command_factory(XMLNode *n) return new MementoCommand(_locations, before, after); } else if (obj_T == typeid (TempoMap).name()) { return new MementoCommand(*_tempo_map, before, after); - } else if (obj_T == typeid (Playlist).name() || obj_T == typeid (AudioPlaylist).name()) { + } else if (obj_T == typeid (Playlist).name() || obj_T == typeid (AudioPlaylist).name() || obj_T == typeid (MidiPlaylist).name()) { if (boost::shared_ptr pl = playlist_by_name(child->property("name")->value())) { return new MementoCommand(*(pl.get()), before, after); } - } else if (obj_T == typeid (Route).name() || obj_T == typeid (AudioTrack).name()) { + } else if (obj_T == typeid (Route).name() || obj_T == typeid (AudioTrack).name() || obj_T == typeid(MidiTrack).name()) { return new MementoCommand(*route_by_id(id), before, after); } else if (obj_T == typeid (Curve).name() || obj_T == typeid (AutomationList).name()) { if (automation_lists.count(id)) -- cgit v1.2.3