summaryrefslogtreecommitdiff
path: root/libs/ardour/session_command.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-09-14 00:41:53 +0000
committerCarl Hetherington <carl@carlh.net>2010-09-14 00:41:53 +0000
commit875f0befd5fb52678d25544fcbcb6e6b55a2c483 (patch)
treeaffac8e73456192dfa9f360f9bd7e6a8651447d4 /libs/ardour/session_command.cc
parent42acfc365f20762042d431f5d75c4a0d32b60b2b (diff)
Fix restoration of MementoCommand<Crossfade>. Fixes #3418.
git-svn-id: svn://localhost/ardour2/branches/3.0@7771 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_command.cc')
-rw-r--r--libs/ardour/session_command.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc
index 8d3ce793bc..17c7d559d4 100644
--- a/libs/ardour/session_command.cc
+++ b/libs/ardour/session_command.cc
@@ -34,6 +34,7 @@
#include "ardour/session_playlists.h"
#include "ardour/region_factory.h"
#include "ardour/midi_automation_list_binder.h"
+#include "ardour/crossfade.h"
#include "pbd/error.h"
#include "pbd/id.h"
#include "pbd/statefuldestructible.h"
@@ -140,7 +141,15 @@ Session::memento_command_factory(XMLNode *n)
}
cerr << "Alist not found\n";
-
+
+ } else if (obj_T == "ARDOUR::Crossfade") {
+ boost::shared_ptr<Crossfade> c = playlists->find_crossfade (id);
+ if (c) {
+ return new MementoCommand<Crossfade> (*c.get(), before, after);
+ } else {
+ error << string_compose (X_("Crossfade %1 not found in session"), id) << endmsg;
+ }
+
} else if (registry.count(id)) { // For Editor and AutomationLine which are off-limits herea
return new MementoCommand<PBD::StatefulDestructible>(*registry[id], before, after);
}