View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004831 | ardour | bugs | public | 2012-04-09 21:16 | 2015-09-18 15:19 |
Reporter | colinf | Assigned To | cth103 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 3.0 | ||||
Summary | 0004831: [PATCH] Can't split only selected regions whilst leaving unselected regions at edit point unsplit. | ||||
Description | In Ardour 2, I used to be able to split only the selected regions at the edit point, leaving other regions which span the edit point unsplit. This doesn't seem to happen any more in A3: a 'split' operation splits all the regions at the edit point, whether they are selected or not. I happen to use this kind of workflow quite frequently when editing sections from one take into another. If the timing of the two takes doesn't match it's good to select and split just the lower regions so they can be moved to align at the end of the upper regions from the other take. | ||||
Tags | No tags attached. | ||||
2012-05-25 00:52
|
act-on-selected-regions-at-edit-point.patch (3,383 bytes)
Index: gtk2_ardour/editor.cc =================================================================== --- gtk2_ardour/editor.cc (revision 12446) +++ gtk2_ardour/editor.cc (working copy) @@ -4526,17 +4526,16 @@ * the edit point is `mouse' and the mouse is over an unselected * region. In this case, start with just that region. * - * Then, make an initial track list of the tracks that these - * regions are on, and if the edit point is not `mouse', add the - * selected tracks. + * Then, add equivalent regions in active edit groups to the region list. * - * Look at this track list and add any other tracks that are on the - * same active edit-enabled route group as one of the initial tracks. + * Then, search the list of selected tracks to find any selected tracks which + * do not contain regions already in the region list. If there are no selected + * tracks and 'No Selection = All Tracks' is active, search all tracks rather + * than just the selected. + + * Add any regions that are under the edit point on these tracks to get the + * returned region list. * - * Finally take the initial region list and add any regions that are - * under the edit point on one of the tracks on the track list to get - * the returned region list. - * * The rationale here is that the mouse edit point is special in that * its position describes both a time and a track; the other edit * modes only describe a time. Hence if the edit point is `mouse' we @@ -4563,22 +4562,41 @@ tracks = selection->tracks; } - /* Add any other tracks that have regions that are in the same + /* Add any other regions that are in the same edit-activated route group as one of our regions. */ - for (RegionSelection::iterator i = regions.begin (); i != regions.end(); ++i) { + regions = get_equivalent_regions (regions, ARDOUR::Properties::edit.property_id); + framepos_t const where = get_preferred_edit_position (); - RouteGroup* g = (*i)->get_time_axis_view().route_group (); + if (_route_groups->all_group_active_button().get_active() && tracks.empty()) { + /* tracks is empty (no track selected), and 'No Selection = All Tracks' + * is enabled, so consider all tracks + */ + tracks = track_views; + } - if (g && g->is_active() && g->is_edit()) { - tracks.add (axis_views_from_routes (g->route_list())); + if (!tracks.empty()) { + /* now search the selected tracks for tracks which don't + already contain regions to be acted upon, and get regions at + the edit point on those tracks too. + */ + TrackViewList tracks_without_relevant_regions; + + for (TrackViewList::iterator t = tracks.begin (); t != tracks.end (); ++t) { + cerr << "track " << (*t)->name() << endl; + if (!regions.involves(**t)) { + /* there are no equivalent regions on this track */ + tracks_without_relevant_regions.push_back(*t); + } } - } - if (!tracks.empty()) { - /* now find regions that are at the edit position on those tracks */ - framepos_t const where = get_preferred_edit_position (); - get_regions_at (regions, where, tracks); + if (!tracks_without_relevant_regions.empty()) { + /* there are some selected tracks with neither selected + * regions or their equivalents: act upon all regions in + * those tracks + */ + get_regions_at (regions, where, tracks_without_relevant_regions); + } } return regions; |
|
Here's a patch which I think makes splitting (and other region operations too) work a bit better when there are both selected and non-selected regions at the edit point. It changes the logic of Editor::get_regions_from_selection_and_edit_point() so that if there are selected regions under the edit point, or equivalent grouped regions, then other regions on the same tracks will not be affected. Non-equivalent and non-selected regions on selected tracks are acted upon only if there are no selected or equivalent regions on the same track. Incidentally, the patch also enables the functionality of the 'No Selection = All Tracks' button. |
|
Applied to SVN 12459. Thanks! |
|
Closing old issues reported by me: these have long since been fixed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-04-09 21:16 | colinf | New Issue | |
2012-04-09 21:19 | colinf | Summary | Can't split only selected regions whilst leaving unselected regions at edit point unset. => Can't split only selected regions whilst leaving unselected regions at edit point unsplit. |
2012-04-09 23:44 | cth103 | cost | => 0.00 |
2012-04-09 23:44 | cth103 | Target Version | => 3.0 beta4 |
2012-05-23 15:08 | cth103 | Target Version | 3.0 beta4 => 3.0 |
2012-05-25 00:52 | colinf | File Added: act-on-selected-regions-at-edit-point.patch | |
2012-05-25 01:00 | colinf | Note Added: 0013294 | |
2012-05-25 01:00 | colinf | Summary | Can't split only selected regions whilst leaving unselected regions at edit point unsplit. => [PATCH] Can't split only selected regions whilst leaving unselected regions at edit point unsplit. |
2012-05-25 01:02 | colinf | Relationship added | related to 0004701 |
2012-05-27 19:36 | cth103 | Note Added: 0013304 | |
2012-05-27 19:36 | cth103 | Status | new => resolved |
2012-05-27 19:36 | cth103 | Resolution | open => fixed |
2012-05-27 19:36 | cth103 | Assigned To | => cth103 |
2012-06-19 18:23 | paul | Relationship added | has duplicate 0004124 |
2015-09-18 15:19 | colinf | Note Added: 0017290 | |
2015-09-18 15:19 | colinf | Status | resolved => closed |