- if ((c = memento_command_factory(n))) {
- ut->add_command(c);
- }
-
- } else if (n->name() == X_("GlobalRouteStateCommand")) {
-
- if ((c = global_state_command_factory (*n))) {
- ut->add_command (c);
- }
-
- } else if (n->name() == "DeltaCommand") {
- 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::DeltaCommand(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;
- }
- }
-
- _history.add (ut);
- }
-
- return 0;
+ if ((c = memento_command_factory(n))) {
+ ut->add_command(c);
+ }
+
+ } else if (n->name() == X_("GlobalRouteStateCommand")) {
+
+ if ((c = global_state_command_factory (*n))) {
+ ut->add_command (c);
+ }
+
+ } else if (n->name() == "DeltaCommand") {
+ 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::DeltaCommand(midi_source->model(), *n));
+ } else {
+ error << _("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 << _("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;
+ }
+ }
+
+ _history.add (ut);
+ }
+
+ return 0;