summaryrefslogtreecommitdiff
path: root/libs/ardour/audioregion.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-26 18:38:42 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-26 18:38:42 +0000
commit34f4b98c349ac1cc0b6ba48f48418f1a3432dff7 (patch)
tree69a9ea467692959a38b8a64cd7b78b951edfc748 /libs/ardour/audioregion.cc
parent6f0c82ee870c90c3daa627c1b8eb582296dd245d (diff)
fix SVN merge SNAFU causing double deletion
git-svn-id: svn://localhost/ardour2/trunk@1028 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audioregion.cc')
-rw-r--r--libs/ardour/audioregion.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index d2cf279d3e..552218f824 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -598,7 +598,7 @@ AudioRegion::state (bool full)
if ((_flags & DefaultFadeIn)) {
child->add_property (X_("default"), X_("yes"));
} else {
- _fade_in.store_state (*child);
+ child->add_child_nocopy (_fade_in.get_state ());
}
child->add_property (X_("active"), _fade_in_disabled ? X_("no") : X_("yes"));
@@ -608,9 +608,9 @@ AudioRegion::state (bool full)
if ((_flags & DefaultFadeOut)) {
child->add_property (X_("default"), X_("yes"));
} else {
- _fade_out.store_state (*child);
+ child->add_child_nocopy (_fade_out.get_state ());
}
-
+
child->add_property (X_("active"), _fade_out_disabled ? X_("no") : X_("yes"));
}
@@ -621,6 +621,7 @@ AudioRegion::state (bool full)
// If there are only two points, the points are in the start of the region and the end of the region
// so, if they are both at 1.0f, that means the default region.
+
if (_envelope.size() == 2 &&
_envelope.front()->value == 1.0f &&
_envelope.back()->value==1.0f) {
@@ -632,7 +633,7 @@ AudioRegion::state (bool full)
if (default_env) {
child->add_property ("default", "yes");
} else {
- _envelope.store_state (*child);
+ child->add_child_nocopy (_envelope.get_state ());
}
} else {
@@ -696,7 +697,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
if ((prop = child->property ("default")) != 0) {
set_default_envelope ();
} else {
- _envelope.load_state (*child);
+ _envelope.set_state (*child);
}
_envelope.set_max_xval (_length);
@@ -709,7 +710,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) {
set_default_fade_in ();
} else {
- _fade_in.load_state (*child);
+ _fade_in.set_state (*child);
}
} else if (child->name() == "FadeOut") {
@@ -719,7 +720,7 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) {
set_default_fade_out ();
} else {
- _fade_out.load_state (*child);
+ _fade_out.set_state (*child);
}
}
}