Compare commits

...

2 Commits

Author SHA1 Message Date
Ben Loftis 85f640c31a ripple: prevent session/punch/loop markers moving during ripple-all
Locations::ripple() skips these markers when the ripple action is committed.

...but the editor moves the marker-items as a visual aid, before actually
  committing the changes to Locations()

...so the editor needs the same logic, to avoid visually inconsistent behavior
2022-07-19 12:33:33 -05:00
Ben Loftis 904491611f rippled region drags should apply on all tracks with selected regions 2022-07-19 12:33:33 -05:00
2 changed files with 12 additions and 2 deletions

View File

@ -1028,14 +1028,21 @@ void
RegionMotionDrag::collect_ripple_views ()
{
RegionSelection copy;
TrackViewList tracklist;
/* find all regions that we *might* ripple */
_editor->get_regionviews_at_or_after (_primary->region()->position(), copy);
TimeAxisView *primary_tav = &_primary->get_time_axis_view();
/* if we aren't in ripple-all, find which tracks we will be rippling, based on the current region selection */
if (!_editor->should_ripple_all()) {
for (RegionSelection::iterator r = _editor->selection->regions.begin(); r != _editor->selection->regions.end(); ++r) {
tracklist.push_back (&(*r)->get_time_axis_view ());
}
}
for (RegionSelection::reverse_iterator i = copy.rbegin(); i != copy.rend(); ++i) {
TimeAxisView *tav = &(*i)->get_time_axis_view();
if (_editor->should_ripple_all() || tav == primary_tav) {
if (_editor->should_ripple_all() || tracklist.contains(tav)) {
if (!_editor->selection->regions.contains (*i)) {
_views.push_back (DraggingView (*i, this, &(*i)->get_time_axis_view()));
}

View File

@ -538,6 +538,9 @@ Editor::get_markers_to_ripple (boost::shared_ptr<Playlist> target_playlist, time
const timepos_t ripple_start = effective_ripple_mark_start (target_playlist, pos);
for (LocationMarkerMap::const_iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
if ( i->first->is_session_range() || i->first->is_auto_punch() || i->first->is_auto_loop() ) {
continue;
}
if (i->first->start() >= ripple_start) {
cerr << "Add markers for " << i->first->name() << endl;
markers.push_back (i->second->start);