From fba4a5ff730a5c7a647f7017ffd55ba03c815556 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 24 Sep 2022 14:27:15 -0600 Subject: [PATCH] fix region drag across tracks that auto-partitioned the receiving playlist Confusion caused during nutempo development when a boolean related to nick_m's old "for music" concept ended up becoming the "auto_partition" argument instead --- gtk2_ardour/editor_drag.cc | 26 +++++++------------------- gtk2_ardour/editor_drag.h | 3 +-- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index bd82ef2330..354163cada 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -1809,15 +1809,10 @@ RegionMoveDrag::finished_copy (bool const changed_position, bool const changed_t RegionView* new_view; if (i->view == _primary && !_x_constrained) { new_view = insert_region_into_playlist (i->view->region(), dest_rtv, i->layer, last_position, - modified_playlists, true); + modified_playlists); } else { - if (i->view->region()->position_time_domain() == Temporal::AudioTime) { - new_view = insert_region_into_playlist (i->view->region(), dest_rtv, i->layer, where, + new_view = insert_region_into_playlist (i->view->region(), dest_rtv, i->layer, where, modified_playlists); - } else { - new_view = insert_region_into_playlist (i->view->region(), dest_rtv, i->layer, where, - modified_playlists, true); - } } if (new_view != 0) { @@ -1945,16 +1940,10 @@ RegionMoveDrag::finished_no_copy ( RegionView* new_view; if (rv == _primary && !_x_constrained) { new_view = insert_region_into_playlist ( - RegionFactory::create (rv->region (), true), dest_rtv, dest_layer, last_position,modified_playlists, true); + RegionFactory::create (rv->region (), true), dest_rtv, dest_layer, last_position,modified_playlists); } else { - if (rv->region()->position_time_domain() == Temporal::AudioTime) { - - new_view = insert_region_into_playlist ( - RegionFactory::create (rv->region (), true), dest_rtv, dest_layer, where, modified_playlists); - } else { - new_view = insert_region_into_playlist ( - RegionFactory::create (rv->region (), true), dest_rtv, dest_layer, where, modified_playlists, true); - } + new_view = insert_region_into_playlist ( + RegionFactory::create (rv->region (), true), dest_rtv, dest_layer, where, modified_playlists); } if (new_view == 0) { @@ -2126,8 +2115,7 @@ RegionMoveDrag::insert_region_into_playlist ( RouteTimeAxisView* dest_rtv, layer_t dest_layer, timepos_t const & where, - PlaylistSet& modified_playlists, - bool for_music + PlaylistSet& modified_playlists ) { boost::shared_ptr dest_playlist = dest_rtv->playlist (); @@ -2148,7 +2136,7 @@ RegionMoveDrag::insert_region_into_playlist ( /* cannot freeze because we need the new region announcements */ } - dest_playlist->add_region (region, where, 1.0, for_music); + dest_playlist->add_region (region, where, 1.0); if (dest_rtv->view()->layer_display() == Stacked || dest_rtv->view()->layer_display() == Expanded) { dest_playlist->set_layer (region, dest_layer); diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index c61aaba366..32e966ec03 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -513,8 +513,7 @@ private: RouteTimeAxisView*, ARDOUR::layer_t, Temporal::timepos_t const &, - PlaylistSet&, - bool for_music = false + PlaylistSet& ); void remove_region_from_playlist (