diff options
author | Carl Hetherington <carl@carlh.net> | 2010-09-14 00:41:53 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-09-14 00:41:53 +0000 |
commit | 875f0befd5fb52678d25544fcbcb6e6b55a2c483 (patch) | |
tree | affac8e73456192dfa9f360f9bd7e6a8651447d4 /libs/ardour/audio_playlist.cc | |
parent | 42acfc365f20762042d431f5d75c4a0d32b60b2b (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/audio_playlist.cc')
-rw-r--r-- | libs/ardour/audio_playlist.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index 5019935d5d..9c3bce4196 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -875,3 +875,18 @@ AudioPlaylist::update (const CrossfadeListProperty::ChangeRecord& change) /* don't remove crossfades here; they will be dealt with by the dependency code */ } + +boost::shared_ptr<Crossfade> +AudioPlaylist::find_crossfade (const PBD::ID& id) const +{ + Crossfades::const_iterator i = _crossfades.begin (); + while (i != _crossfades.end() && (*i)->id() != id) { + ++i; + } + + if (i == _crossfades.end()) { + return boost::shared_ptr<Crossfade> (); + } + + return *i; +} |