AudioPlaylist::AudioPlaylist (Session& session, const XMLNode& node, bool hidden)
: Playlist (session, node, hidden)
{
- in_set_state = true;
+ in_set_state++;
set_state (node);
- in_set_state = false;
+ in_set_state--;
if (!hidden) {
PlaylistCreated (this); /* EMIT SIGNAL */
notify_callbacks ();
- for (Crossfades::iterator x = _crossfades.begin(); x != _crossfades.end(); ++x) {
+ for (Crossfades::iterator x = _crossfades.begin(); x != _crossfades.end(); ) {
+ Crossfades::iterator tmp;
+
+ tmp = x;
+ ++tmp;
+
delete *x;
+
+ x = tmp;
}
}
{
Crossfades::iterator i, tmp;
boost::shared_ptr<AudioRegion> r = boost::dynamic_pointer_cast<AudioRegion> (region);
+
+ if (in_set_state) {
+ return;
+ }
if (r == 0) {
fatal << _("programming error: non-audio Region passed to remove_overlap in audio playlist")
} else {
- xfade = new Crossfade (other, region, Config->get_xfade_model(), Config->get_crossfades_active());
+ xfade = new Crossfade (other, region, Config->get_xfade_model(), Config->get_xfades_active());
add_crossfade (*xfade);
}
}
XMLNodeList nlist;
XMLNodeConstIterator niter;
+ in_set_state++;
+ freeze ();
+
Playlist::set_state (node);
nlist = node.children();
}
}
+ thaw ();
+ in_set_state++;
+
return 0;
}