summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-09-06 18:11:55 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-09-06 18:11:55 +0000
commit837bfc9af44c5b6c1eeb14e7af8d9ec62c59aac6 (patch)
treecb1fc5bf4f58290efd82e95274d33f67e828b0e5 /libs/ardour/session_state.cc
parentc3c5c9a559f0dcf63a901f0f99f579fedf64984d (diff)
the start (only the start) of MIDI diff commands
git-svn-id: svn://localhost/ardour2/branches/3.0@5637 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index c782882c0f..32a4a50cb4 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -2932,6 +2932,16 @@ Session::restore_history (string snapshot_name)
} else {
error << "FIXME: Failed to downcast MidiSource for DeltaCommand" << endmsg;
}
+ } else if (n->name() == "DiffCommand") {
+ PBD::ID id(n->property("midi-source")->value());
+ boost::shared_ptr<MidiSource> midi_source =
+ boost::dynamic_pointer_cast<MidiSource, Source>(source_by_id(id));
+ if(midi_source) {
+ ut->add_command(new MidiModel::DiffCommand(midi_source->model(), *n));
+ } else {
+ error << "FIXME: Failed to downcast MidiSource for DeltaCommand" << endmsg;
+ }
+
} else {
error << string_compose(_("Couldn't figure out how to make a Command out of a %1 XMLNode."), n->name()) << endmsg;
}