Minor cleanup.
[ardour.git] / libs / ardour / session_command.cc
index 8d3ce793bcf6eb65c74b0b89144f34bf798b29f1..17c7d559d4795bf25efbf1fc882c90700665318b 100644 (file)
@@ -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);
     }