diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 61a0fdd420..4723a0a66a 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -2799,7 +2799,6 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event) set > affected_playlists; pair >::iterator,bool> insert_result; - // TODO: Crossfades need to be copied! for (list::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) { RegionView* rv; @@ -2807,7 +2806,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event) boost::shared_ptr to_playlist = rv->region()->playlist(); RouteTimeAxisView* atv = dynamic_cast(&rv->get_time_axis_view()); - + insert_result = affected_playlists.insert (to_playlist); if (insert_result.second) { session->add_command (new MementoCommand(*to_playlist, &to_playlist->get_state(), 0)); @@ -3227,7 +3226,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event) /* hide any dependent views */ -// rv->get_time_axis_view().hide_dependent_views (*rv); + rv->get_time_axis_view().hide_dependent_views (*rv); /* this is subtle. raising the regionview itself won't help, because raise_to_top() just puts the item on the top of diff --git a/libs/ardour/ardour/crossfade.h b/libs/ardour/ardour/crossfade.h index 946d35b8e0..62ab1f775d 100644 --- a/libs/ardour/ardour/crossfade.h +++ b/libs/ardour/ardour/crossfade.h @@ -157,6 +157,7 @@ class Crossfade : public PBD::StatefulDestructible, public boost::enable_shared_ AnchorPoint _anchor_point; bool _follow_overlap; bool _fixed; + int32_t layer_relation; Curve _fade_in; Curve _fade_out; @@ -165,7 +166,7 @@ class Crossfade : public PBD::StatefulDestructible, public boost::enable_shared_ void initialize (); int compute (boost::shared_ptr, boost::shared_ptr, CrossfadeModel); - bool update (bool force); + bool update (); void member_changed (ARDOUR::Change); }; diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index f3e71d320b..eefbeb7889 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -274,9 +274,14 @@ AudioPlaylist::refresh_dependents (boost::shared_ptr r) if ((*x)->involves (ar)) { if (find (updated.begin(), updated.end(), *x) == updated.end()) { - if ((*x)->refresh ()) { - /* not invalidated by the refresh */ - updated.insert (*x); + try { + if ((*x)->refresh ()) { + updated.insert (*x); + } + } + + catch (Crossfade::NoCrossfadeHere& err) { + // relax, Invalidated during refresh } } } @@ -348,6 +353,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) refresh_dependents (r); } + if (!Config->get_auto_xfade()) { return; } @@ -405,7 +411,6 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) xfade_length = min ((nframes_t) 720, top->length()); xfade = boost::shared_ptr (new Crossfade (top, bottom, xfade_length, top->first_frame(), StartOfIn)); - cerr << "StartOfIn is " << xfade << endl; add_crossfade (xfade); if (top_region_at (top->last_frame() - 1) == top) { @@ -415,7 +420,6 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) */ xfade = boost::shared_ptr (new Crossfade (bottom, top, xfade_length, top->last_frame() - xfade_length, EndOfOut)); - cerr << "EndofOut is " << xfade << endl; add_crossfade (xfade); } break; diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc index 69f3cb32c1..337911d3e4 100644 --- a/libs/ardour/crossfade.cc +++ b/libs/ardour/crossfade.cc @@ -89,8 +89,6 @@ Crossfade::Crossfade (boost::shared_ptr in, boost::shared_ptr