#include "ardour/session_playlists.h"
#include "ardour/region_factory.h"
#include "ardour/midi_automation_list_binder.h"
+#include "ardour/crossfade_binder.h"
+#include "ardour/crossfade.h"
#include "pbd/error.h"
#include "pbd/id.h"
#include "pbd/statefuldestructible.h"
return new MementoCommand<Source>(*sources[id], before, after);
} else if (obj_T == "ARDOUR::Location") {
- Location* loc = _locations.get_location_by_id(id);
+ Location* loc = _locations->get_location_by_id(id);
if (loc) {
return new MementoCommand<Location>(*loc, before, after);
}
} else if (obj_T == "ARDOUR::Locations") {
- return new MementoCommand<Locations>(_locations, before, after);
+ return new MementoCommand<Locations>(*_locations, before, after);
} else if (obj_T == "ARDOUR::TempoMap") {
return new MementoCommand<TempoMap>(*_tempo_map, before, after);
before, after
);
}
-
- cerr << "Alist not found\n";
-
+
+ cerr << "Alist " << id << " not found\n";
+
+ } else if (obj_T == "ARDOUR::Crossfade") {
+ if (have_id) {
+ boost::shared_ptr<Crossfade> c = playlists->find_crossfade (id);
+ if (c) {
+ return new MementoCommand<Crossfade> (*c.get(), before, after);
+ }
+ } else {
+ return new MementoCommand<Crossfade> (
+ new CrossfadeBinder (n, playlists),
+ before, after
+ );
+ }
+
} else if (registry.count(id)) { // For Editor and AutomationLine which are off-limits herea
return new MementoCommand<PBD::StatefulDestructible>(*registry[id], before, after);
}
}
/* we failed */
-
+
error << string_compose (
_("could not reconstitute StatefulDiffCommand from XMLNode. object type = %1 id = %2"), obj_T, id.to_s())
<< endmsg;
-
+
return 0;
}