From 7280d39effb471cd3a3d6b91a3962160c65b9878 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 17 Jan 2010 14:22:41 +0000 Subject: 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 --- libs/ardour/audio_playlist.cc | 9 +++++++++ libs/ardour/crossfade.cc | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'libs') 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 xfade = boost::shared_ptr (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 newin, boost::shared_ptr newout) -- cgit v1.2.3