summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-01-17 14:22:41 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-01-17 14:22:41 +0000
commit7280d39effb471cd3a3d6b91a3962160c65b9878 (patch)
tree025cf14f81a7bd9d655cc816f50804a797ec9141
parentd97b3d8f285fcc811e435ea40e943efa7fb23f79 (diff)
do not run update() on a Crossfade from inside its constructor, since shared_from_this() will not work there. moved the call outside, just after the from-XML constructor call in audioplaylist
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6510 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/audio_playlist.cc9
-rw-r--r--libs/ardour/crossfade.cc6
2 files changed, 9 insertions, 6 deletions
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index c883856cf8..9c331af610 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -525,6 +525,15 @@ AudioPlaylist::set_state (const XMLNode& node)
try {
boost::shared_ptr<Crossfade> xfade = boost::shared_ptr<Crossfade> (new Crossfade (*((const Playlist *)this), *child));
_crossfades.push_back (xfade);
+
+ /* we should not need to do this here, since all values were set via XML. however
+ some older sessions may have bugs and this allows us to fix them.
+ */
+
+ xfade->update ();
+
+ /* we care about these signals ... */
+
xfade->Invalidated.connect (mem_fun (*this, &AudioPlaylist::crossfade_invalidated));
xfade->StateChanged.connect (mem_fun (*this, &AudioPlaylist::crossfade_changed));
NewCrossfade(xfade);
diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc
index ee8e761f8f..0c0889fb1b 100644
--- a/libs/ardour/crossfade.cc
+++ b/libs/ardour/crossfade.cc
@@ -163,12 +163,6 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode& node)
if (set_state (node)) {
throw failed_constructor();
}
-
- /* we should not need to do this here, since all values were set via XML. however
- some older sessions may have bugs and this allows us to fix them.
- */
-
- update ();
}
Crossfade::Crossfade (const Crossfade &orig, boost::shared_ptr<AudioRegion> newin, boost::shared_ptr<AudioRegion> newout)