summaryrefslogtreecommitdiff
path: root/libs/ardour/crossfade.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/crossfade.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/crossfade.cc')
-rw-r--r--libs/ardour/crossfade.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc
index 67ccea9371..6b0c0a9560 100644
--- a/libs/ardour/crossfade.cc
+++ b/libs/ardour/crossfade.cc
@@ -717,6 +717,8 @@ Crossfade::get_state ()
char buf[64];
LocaleGuard lg (X_("POSIX"));
+ id().print (buf, sizeof (buf));
+ node->add_property ("id", buf);
_out->id().print (buf, sizeof (buf));
node->add_property ("out", buf);
_in->id().print (buf, sizeof (buf));
@@ -774,6 +776,10 @@ Crossfade::set_state (const XMLNode& node, int /*version*/)
PropertyChange what_changed;
framepos_t val;
+ if ((prop = node.property (X_("id")))) {
+ _id = prop->value();
+ }
+
if ((prop = node.property ("position")) != 0) {
sscanf (prop->value().c_str(), "%" PRId64, &val);
if (val != _position) {