diff options
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 483c9a0899..fd14094f7f 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -91,6 +91,7 @@ #include "ardour/midi_track.h" #include "ardour/named_selection.h" #include "ardour/processor.h" +#include "ardour/region_command.h" #include "ardour/region_factory.h" #include "ardour/route_group.h" #include "ardour/send.h" @@ -2944,6 +2945,16 @@ Session::restore_history (string snapshot_name) error << _("Failed to downcast MidiSource for DeltaCommand") << endmsg; } + } else if (n->name() == "RegionCommand") { + PBD::ID id (n->property ("region")->value()); + boost::shared_ptr<Region> region = RegionFactory::region_by_id (id); + + if (region) { + ut->add_command (new RegionCommand (region, *n)); + } else { + error << string_compose (_("Region command references an unknown region ID=%1"), id.to_s()) << endmsg; + } + } else { error << string_compose(_("Couldn't figure out how to make a Command out of a %1 XMLNode."), n->name()) << endmsg; } |